Ticket #3773: show_app_label_in_permission_list.txt

File show_app_label_in_permission_list.txt, 615 bytes (added by Tai Lee, 17 years ago)

prefix Permission.str() with contenttype.app_label

Line 
1Index: contrib/auth/models.py
2===================================================================
3--- contrib/auth/models.py (revision 4766)
4+++ contrib/auth/models.py (working copy)
5@@ -45,7 +45,7 @@
6 ordering = ('content_type', 'codename')
7
8 def __str__(self):
9- return "%s | %s" % (self.content_type, self.name)
10+ return "%s | %s | %s" % (self.content_type.app_label, self.content_type, 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.
Back to Top