Opened 8 years ago

Closed 8 years ago

#8226 closed (fixed)

django/contrib/auth/models.py UnicodeDecodeError. Permissions selection widget not shown.

Reported by: Nils Fredrik Gjerull Owned by: nobody
Component: Uncategorized Version: master
Severity: Keywords: unicode auth permission
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The "permission selection" widget was not shown in the "change user" form in the admin interface.

I have unicode characters in some of my models' verbose_name attribute and this triggered a bug in django/contrib/auth/models.py. According to what i read here you have to call unicode explicitly if you use unicode string with placeholders (e.g. u'%s' % unicode(foo)). This is not done in the Permission model.

Attachments (1)

auth_permission_unicode.diff (713 bytes) - added by Nils Fredrik Gjerull 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by Nils Fredrik Gjerull

comment:1 Changed 8 years ago by Nils Fredrik Gjerull

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

Forgot to mention that this only applies to python 2.3.

comment:2 Changed 8 years ago by Gary Wilson

Resolution: fixed
Status: newclosed

(In [8302]) Fixed #8226 -- Fixed a Python 2.3 incompatibility in a unicode string substitution, thanks nfg.

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