Rendering model attributes names translated by gettext() that contain non-ascii chars crash django admin?

40 views
Skip to first unread message

Rafał Pitoń

unread,
Apr 21, 2016, 9:33:34 AM4/21/16
to Django developers (Contributions to Django itself)
I'm on django 1.9.5 and I can't access admin panel for user because django admin crashes on template render.

It seems that it reverses _('users') into "użytkownicy", and then crashes when rendering template "django/contrib/admin/templates/admin/change_list.html" on line 91 ("{% result_list cl %}") with error:

UnicodeDecodeError at /admin/discounts/user/
'ascii' codec can't decode byte 0xc5 in position 1: ordinal not in range(128)

Unicode error hint

The string that could not be encoded/decoded was: u��ytko

Tim Graham

unread,
Apr 21, 2016, 9:39:47 AM4/21/16
to Django developers (Contributions to Django itself)
We need a sample project or a test for Django's test suite that reproduces the issue. Generally, "is it a bug?" questions are more appropriate for django-users. After directing your query there, you can create a Trac ticket if others confirm it's a bug in Django and not in your own project.
Reply all
Reply to author
Forward
0 new messages