Support for inofficial languages

This commit is contained in:
Raphael Michel
2018-03-08 13:19:57 +01:00
parent d879634810
commit 162f37e00f
8 changed files with 127 additions and 7 deletions

View File

@@ -8,6 +8,7 @@ from django.utils.translation import ugettext_lazy as _
from pytz import common_timezones
from pretix.base.models import User
from pretix.control.forms import SingleLanguageWidget
class UserSettingsForm(forms.ModelForm):
@@ -47,6 +48,9 @@ class UserSettingsForm(forms.ModelForm):
'timezone',
'email'
]
widgets = {
'locale': SingleLanguageWidget
}
def __init__(self, *args, **kwargs):
self.user = kwargs.pop('user')