Code

Ticket #8226: auth_permission_unicode.diff

File auth_permission_unicode.diff, 713 bytes (added by nfg, 6 years ago)
Line 
1Index: django/contrib/auth/models.py
2===================================================================
3--- django/contrib/auth/models.py       (revisjon 8301)
4+++ django/contrib/auth/models.py       (arbeidskopi)
5@@ -81,7 +81,7 @@
6         ordering = ('content_type__app_label', 'codename')
7 
8     def __unicode__(self):
9-        return u"%s | %s | %s" % (self.content_type.app_label, self.content_type, self.name)
10+        return u"%s | %s | %s" % (unicode(self.content_type.app_label), unicode(self.content_type), unicode(self.name))
11 
12 class Group(models.Model):
13     """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.