Merge branch 'fresh-start' into sponsorship

This commit is contained in:
James Tauber 2012-02-22 17:19:17 -05:00
commit b2f8919843

View file

@ -1,4 +1,5 @@
from django.db import models from django.db import models
from django.utils.translation import ugettext_lazy as _
from timezones.fields import TimeZoneField from timezones.fields import TimeZoneField
@ -11,14 +12,14 @@ class Conference(models.Model):
the full conference for a specific year, e.g. US PyCon 2012. the full conference for a specific year, e.g. US PyCon 2012.
""" """
title = models.CharField(max_length=100) title = models.CharField(_('title'), max_length=100)
# when the conference runs # when the conference runs
start_date = models.DateField(null=True, blank=True) start_date = models.DateField(_('start date'), null=True, blank=True)
end_date = models.DateField(null=True, blank=True) end_date = models.DateField(_('end date'), null=True, blank=True)
# timezone the conference is in # timezone the conference is in
timezone = TimeZoneField(blank=True) timezone = TimeZoneField(_('timezone'), blank=True)
def __unicode__(self): def __unicode__(self):
return self.title return self.title
@ -36,6 +37,10 @@ class Conference(models.Model):
except KeyError: except KeyError:
pass pass
class Meta(object):
verbose_name = _('conference')
verbose_name_plural = _('conferences')
class Section(models.Model): class Section(models.Model):
""" """
@ -44,17 +49,21 @@ class Section(models.Model):
scheduling process. scheduling process.
""" """
conference = models.ForeignKey(Conference) conference = models.ForeignKey(Conference, verbose_name=_('conference'))
name = models.CharField(max_length=100) name = models.CharField(_('name'), max_length=100)
# when the section runs # when the section runs
start_date = models.DateField(null=True, blank=True) start_date = models.DateField(_('start date'), null=True, blank=True)
end_date = models.DateField(null=True, blank=True) end_date = models.DateField(_('end date'), null=True, blank=True)
def __unicode__(self): def __unicode__(self):
return self.name return self.name
class Meta(object):
verbose_name = _('section')
verbose_name_plural = _('sections')
def current_conference(): def current_conference():
from django.conf import settings from django.conf import settings