internationalized the sponsor model fields
This commit is contained in:
parent
b2f8919843
commit
de0cf9f163
1 changed files with 20 additions and 13 deletions
|
@ -1,19 +1,22 @@
|
|||
import datetime
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from conference.models import Conference
|
||||
|
||||
|
||||
class SponsorLevel(models.Model):
|
||||
|
||||
conference = models.ForeignKey(Conference)
|
||||
name = models.CharField(max_length=100)
|
||||
order = models.IntegerField(default=0)
|
||||
description = models.TextField(blank=True)
|
||||
conference = models.ForeignKey(Conference, verbose_name=_("conference"))
|
||||
name = models.CharField(_("name"), max_length=100)
|
||||
order = models.IntegerField(_("order"), default=0)
|
||||
description = models.TextField(_("description"), blank=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ["conference", "order"]
|
||||
verbose_name = _("sponsor level")
|
||||
verbose_name_plural = _("sponsor levels")
|
||||
|
||||
def __unicode__(self):
|
||||
return u"%s %s" % (self.conference, self.name)
|
||||
|
@ -24,15 +27,19 @@ class SponsorLevel(models.Model):
|
|||
|
||||
class Sponsor(models.Model):
|
||||
|
||||
name = models.CharField(max_length=100)
|
||||
external_url = models.URLField("external URL")
|
||||
annotation = models.TextField(blank=True)
|
||||
contact_name = models.CharField(max_length=100)
|
||||
contact_email = models.EmailField(u"Contact e\u2011mail")
|
||||
logo = models.ImageField(upload_to="sponsor_logos/")
|
||||
level = models.ForeignKey(SponsorLevel)
|
||||
added = models.DateTimeField(default=datetime.datetime.now)
|
||||
active = models.BooleanField(default=False)
|
||||
name = models.CharField(_("name"), max_length=100)
|
||||
external_url = models.URLField(_("external URL"))
|
||||
annotation = models.TextField(_("annotation"), blank=True)
|
||||
contact_name = models.CharField(_("contact_name"), max_length=100)
|
||||
contact_email = models.EmailField(_(u"Contact e\u2011mail"))
|
||||
logo = models.ImageField(_("logo"), upload_to="sponsor_logos/")
|
||||
level = models.ForeignKey(SponsorLevel, verbose_name=_("level"))
|
||||
added = models.DateTimeField(_("added"), default=datetime.datetime.now)
|
||||
active = models.BooleanField(_("active"), default=False)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("sponsor")
|
||||
verbose_name_plural = _("sponsors")
|
||||
|
|
Loading…
Reference in a new issue