зеркало из https://github.com/mozilla/kitsune.git
Add a 'locale' field to user profiles. [bug 638247]
This commit is contained in:
Родитель
1b03a4de54
Коммит
0146678ec3
|
@ -15,7 +15,7 @@ from tower import ugettext as _
|
|||
from tower import ugettext_lazy as _lazy
|
||||
|
||||
from countries import COUNTRIES
|
||||
from sumo.models import ModelBase
|
||||
from sumo.models import ModelBase, LocaleField
|
||||
from sumo.urlresolvers import reverse
|
||||
from sumo.utils import auto_delete_files
|
||||
|
||||
|
@ -59,6 +59,8 @@ class Profile(ModelBase):
|
|||
livechat_id = models.CharField(default=None, null=True, blank=True,
|
||||
max_length=255,
|
||||
verbose_name=_lazy(u'Livechat ID'))
|
||||
locale = LocaleField(default=settings.LANGUAGE_CODE,
|
||||
verbose_name=_lazy(u'Preferred language for email'))
|
||||
|
||||
def __unicode__(self):
|
||||
return unicode(self.user)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
-- Add a preferred locale to profiles.
|
||||
ALTER TABLE `users_profile`
|
||||
ADD `locale` varchar(7) NOT NULL DEFAULT 'en-US';
|
Загрузка…
Ссылка в новой задаче