Skip to content

Commit

Permalink
Removed deprecated copy of PermWrapper and PermLookupDict from django…
Browse files Browse the repository at this point in the history
….core.context_processors.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
aaugustin committed Mar 31, 2012
1 parent bfbe4df commit 95d9662
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions django/core/context_processors.py
Expand Up @@ -69,32 +69,3 @@ def media(request):

def request(request):
return {'request': request}

# PermWrapper and PermLookupDict proxy the permissions system into objects that
# the template system can understand. They once lived here -- they have
# been moved to django.contrib.auth.context_processors.

from django.contrib.auth.context_processors import PermLookupDict as RealPermLookupDict
from django.contrib.auth.context_processors import PermWrapper as RealPermWrapper

class PermLookupDict(RealPermLookupDict):
def __init__(self, *args, **kwargs):
import warnings
warnings.warn(
"`django.core.context_processors.PermLookupDict` is " \
"deprecated; use `django.contrib.auth.context_processors.PermLookupDict` " \
"instead.",
DeprecationWarning
)
super(PermLookupDict, self).__init__(*args, **kwargs)

class PermWrapper(RealPermWrapper):
def __init__(self, *args, **kwargs):
import warnings
warnings.warn(
"`django.core.context_processors.PermWrapper` is " \
"deprecated; use `django.contrib.auth.context_processors.PermWrapper` " \
"instead.",
DeprecationWarning
)
super(PermWrapper, self).__init__(*args, **kwargs)

0 comments on commit 95d9662

Please sign in to comment.