diff options
| author | Gary Wilson Jr <gary.wilson@gmail.com> | 2008-08-11 15:13:00 +0000 |
|---|---|---|
| committer | Gary Wilson Jr <gary.wilson@gmail.com> | 2008-08-11 15:13:00 +0000 |
| commit | f09f14d0ae42366606a20ab8b1570c7f4e22dc49 (patch) | |
| tree | d90d6480f79a32c103abb0f891fade5431ee77b8 | |
| parent | 97fd752fe73d644bc83ad4535c6f4b219c5e7bc7 (diff) | |
Fixed #8226 -- Fixed a Python 2.3 incompatibility in a unicode string substitution, thanks nfg.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/auth/models.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index 43b50a3fb9..1f0a0386db 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -81,7 +81,10 @@ class Permission(models.Model): ordering = ('content_type__app_label', 'codename') def __unicode__(self): - return u"%s | %s | %s" % (self.content_type.app_label, self.content_type, self.name) + return u"%s | %s | %s" % ( + unicode(self.content_type.app_label), + unicode(self.content_type), + unicode(self.name)) class Group(models.Model): """Groups are a generic way of categorizing users to apply permissions, or some other label, to those users. A user can belong to any number of groups. @@ -96,7 +99,7 @@ class Group(models.Model): class Meta: verbose_name = _('group') verbose_name_plural = _('groups') - + def __unicode__(self): return self.name @@ -149,7 +152,7 @@ class User(models.Model): class Meta: verbose_name = _('user') verbose_name_plural = _('users') - + def __unicode__(self): return self.username |
