Opened 9 years ago

Closed 9 years ago

#3947 closed (duplicate)

Localized labels don't work with newforms

Reported by: anonymous Owned by: adrian
Component: Forms Version: master
Severity: Keywords: newforms, unicode
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I have this form.

from django import newforms as forms
from django.utils.translation import gettext_lazy as _

    ('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).

Attachments (1)

newforms-unicode.diff (1.9 KB) - added by anonymous 9 years ago.

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by anonymous

comment:1 Changed 9 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

This is the same underlying problem as #3924. I'm working on it now.

Note: See TracTickets for help on using tickets.
Back to Top