Opened 17 years ago
Closed 17 years ago
#4451 closed (fixed)
[newforms-admin] UnicodeDecodeError at getext string in widgets
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | newforms-admin |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This is bugreport of general bug. First I wrote one example where it happends:
When I have newforms django admin site in my language (Czek(cs), but it dosn't matter), and go to model page, which has DateTime field, I get UnicodeDecodeError, such like this ("Time" is "Čas" in Czek):
UnicodeDecodeError at /admin/cms/menu/62/ 'ascii' codec can't decode byte 0xc4 in position 0: ordinal not in range(128) Request Method: GET Request URL: http://127.0.0.1:8000/admin/cms/menu/62/ Exception Type: UnicodeDecodeError Exception Value: 'ascii' codec can't decode byte 0xc4 in position 0: ordinal not in range(128) Exception Location: /usr/lib/python2.4/site-packages/django/contrib/admin/widgets.py in format_output, line 42
The coresponding line is:
return u'<p class="datetime">%s %s<br />%s %s</p>' % \ (_('Date:'), rendered_widgets[0], _('Time:'), rendered_widgets[1])
This bug happends at lot of places in widgets.py, where gettext character is rendered to unicode string.
Change History (4)
comment:1 by , 17 years ago
Component: | Uncategorized → Admin interface |
---|---|
Owner: | changed from | to
comment:2 by , 17 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Version: | SVN → other branch |
comment:3 by , 17 years ago
Version: | other branch → newforms-admin |
---|
Note:
See TracTickets
for help on using tickets.
This can't be consistently fixed until we do the UnicodeBranch -> trunk -> NewformsAdminBranch merge hop. Then we can fix the new admin stuff to be unicode-aware.