diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-03-25 21:28:59 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-03-25 21:28:59 +0000 |
| commit | 796b2304f306ff32527fc384c9be0ba783b2df05 (patch) | |
| tree | 5271633a9b3f4e208961b8f92c9eab9f2ce1d996 | |
| parent | f2861dad432c7f3a21c5e76f6955ada35ace6128 (diff) | |
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
| -rw-r--r-- | django/contrib/auth/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index 4f4f0b7538..c3aa863892 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -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. |
