Kaydet (Commit) 796b2304 authored tarafından Adrian Holovaty's avatar Adrian Holovaty

Fixed #3773 -- Added app_label to Permission.__str__(), so that the admin…

Fixed #3773 -- Added app_label to Permission.__str__(), so that the admin permission list is easier to use with multiple permissions of the same name. Thanks, mrmachine

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4823 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst f2861dad
......@@ -45,7 +45,7 @@ class Permission(models.Model):
ordering = ('content_type', 'codename')
def __str__(self):
return "%s | %s" % (self.content_type, self.name)
return "%s | %s | %s" % (self.content_type.app_label, self.content_type, 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment