From dd8b60bd17e9b93fb9c60ebe03f34d2bf0237419 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Mon, 27 Mar 2006 19:15:36 +0000 Subject: [PATCH] magic-removal: Removed some unused duplicated code. git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2568 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/shortcuts/__init__.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/django/shortcuts/__init__.py b/django/shortcuts/__init__.py index 9985e37c29..496f8ecd70 100644 --- a/django/shortcuts/__init__.py +++ b/django/shortcuts/__init__.py @@ -21,22 +21,3 @@ def get_list_or_404(klass, **kwargs): if not obj_list: raise Http404 return obj_list - -# PermWrapper and PermLookupDict proxy the permissions system into objects that -# the template system can understand. - -class PermLookupDict: - def __init__(self, user, module_name): - self.user, self.module_name = user, module_name - def __repr__(self): - return str(self.user.get_permission_list()) - 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: - def __init__(self, user): - self.user = user - def __getitem__(self, module_name): - return PermLookupDict(self.user, module_name)