Localized labels don't work with newforms
|Reported by:||anonymous||Owned by:||adrian|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I have this form.
from django import newforms as forms from django.utils.translation import gettext_lazy as _ LANGUAGES = ( ('cs', _('Czech')), ('en', _('English')), ) class ChangeProfileForm(forms.Form): language = forms.ChoiceField(label=_('Language'), choices=LANGUAGES) email = forms.EmailField(label=_('Email')) phone = forms.CharField(label=_('Phone'))
If localized labels are in UTF-8 and I don't use attached patch, forms don't work (UnicodeDecodeError).