21 lines
567 B
Python
21 lines
567 B
Python
from django.db import models
|
|
from django.utils.translation import ugettext as _
|
|
from django.contrib.auth.models import User
|
|
|
|
|
|
|
|
class Message ( models.Model ):
|
|
|
|
titel = models.CharField( max_length = 100, verbose_name = _("titel") )
|
|
text = models.TextField( blank=False, verbose_name = _("text") )
|
|
|
|
creation_time = models.DateTimeField( verbose_name=_("creation_time") )
|
|
|
|
author = models.ForeignKey( User, verbose_name=_("Author") )
|
|
|
|
|
|
def __unicode__( self ):
|
|
return self.author.username + " : " + self.titel
|
|
|
|
|
|
|