Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #2418 -- Fixed obsolete method call in PermLookupDict.__repr__.…

… Thanks,

DarkElf109@ibendit.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3798 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 93597d051d9ef8bcdf0ff6b9859406b73ab4f52c 1 parent 26954aa
@malcolmt malcolmt authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 django/core/context_processors.py
View
6 django/core/context_processors.py
@@ -51,15 +51,19 @@ def request(request):
class PermLookupDict(object):
def __init__(self, user, module_name):
self.user, self.module_name = user, module_name
+
def __repr__(self):
- return str(self.user.get_permission_list())
+ return str(self.user.get_all_permissions())
+
def __getitem__(self, perm_name):
return self.user.has_perm("%s.%s" % (self.module_name, perm_name))
+
def __nonzero__(self):
return self.user.has_module_perms(self.module_name)
class PermWrapper(object):
def __init__(self, user):
self.user = user
+
def __getitem__(self, module_name):
return PermLookupDict(self.user, module_name)

0 comments on commit 93597d0

Please sign in to comment.
Something went wrong with that request. Please try again.