Eventplanner: Grid / Translation

This commit is contained in:
Martin Bauer
2013-06-30 11:01:12 +02:00
parent d4ba7d9a60
commit 01a7f5c16f
21 changed files with 3882 additions and 195 deletions

View File

@@ -13,14 +13,14 @@ class Event ( models.Model ):
( 'GenReh', _('General Rehearsal') ),
)
title = models.CharField( max_length=40 )
type = models.CharField( max_length=6, choices=EVENT_TYPES, default='Reh' )
date = models.DateField()
time = models.TimeField( null=True, blank=True )
participants = models.ManyToManyField( Musician, through='EventParticipation' )
title = models.CharField( max_length=40, verbose_name = _("title") )
type = models.CharField( max_length=6, choices=EVENT_TYPES, default='Reh', verbose_name= _("type") )
date = models.DateField( verbose_name= _("date") )
time = models.TimeField( null=True, blank=True, verbose_name = _("time") )
participants = models.ManyToManyField( Musician, through='EventParticipation', verbose_name=_("participants") )
desc = models.TextField( blank=True)
location = LocationField()
desc = models.TextField( blank=True, verbose_name=_("description"))
location = LocationField( verbose_name=_("location") )
def __unicode__(self):
@@ -46,10 +46,10 @@ class EventParticipation( models.Model ):
('No' , _('No' ))
)
event = models.ForeignKey( Event )
musician = models.ForeignKey( Musician )
status = models.CharField ( max_length=3, choices = OPTIONS, default='?' )
comment = models.CharField ( max_length=64, blank=True )
event = models.ForeignKey( Event, verbose_name=_("event") )
musician = models.ForeignKey( Musician, verbose_name=_("musician") )
status = models.CharField ( max_length=3, choices = OPTIONS, default='?', verbose_name=_("status") )
comment = models.CharField ( max_length=64, blank=True, verbose_name=_("comment") )
def get_musician_username(self):
return self.musician.user.username