Django

Code

Ticket #8226 (closed: fixed)

Opened 5 months ago

Last modified 5 months ago

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

Reported by: nfg Assigned to: nobody
Milestone: Component: Uncategorized
Version: SVN Keywords: unicode auth permission
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

auth_permission_unicode.diff (0.7 kB) - added by nfg on 08/11/08 09:39:28.

Change History

08/11/08 09:39:28 changed by nfg

  • attachment auth_permission_unicode.diff added.

08/11/08 09:40:28 changed by nfg

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

Forgot to mention that this only applies to python 2.3.

08/11/08 10:13:00 changed by gwilson

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #8226 (django/contrib/auth/models.py UnicodeDecodeError. Permissions selection widget not shown.)




Change Properties
Action