Add support for multi-locale email templates. Also added Russian templates (closes GH-1). REQUIRES SCHEMA CHANGE: SEE FILE UPGRADE.

This commit is contained in:
Ross Poulton
2011-03-11 22:30:59 +00:00
parent b5da29dcfe
commit eca88be838
7 changed files with 273 additions and 31 deletions

View File

@ -715,7 +715,6 @@ class EmailTemplate(models.Model):
template_name = models.CharField(
_('Template Name'),
max_length=100,
unique=True,
)
subject = models.CharField(
@ -746,12 +745,20 @@ class EmailTemplate(models.Model):
help_text=_('The same context is available here as in plain_text, '
'above.'),
)
locale = models.CharField(
_('Locale'),
max_length=10,
blank=True,
null=True,
help_text=_('Locale of this template.'),
)
def __unicode__(self):
return u'%s' % self.template_name
class Meta:
ordering = ['template_name',]
ordering = ['template_name', 'locale']
class KBCategory(models.Model):