mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46:09 +00:00
Fixed #2109 -- Convert old-style classes to new-style classes throughout Django. Thanks, Nicola Larosa
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -36,7 +36,7 @@ def i18n(request):
|
||||
context_extras['LANGUAGE_CODE'] = request.LANGUAGE_CODE
|
||||
else:
|
||||
context_extras['LANGUAGE_CODE'] = settings.LANGUAGE_CODE
|
||||
|
||||
|
||||
from django.utils import translation
|
||||
context_extras['LANGUAGE_BIDI'] = translation.get_language_bidi()
|
||||
|
||||
@@ -48,7 +48,7 @@ def request(request):
|
||||
# PermWrapper and PermLookupDict proxy the permissions system into objects that
|
||||
# the template system can understand.
|
||||
|
||||
class PermLookupDict:
|
||||
class PermLookupDict(object):
|
||||
def __init__(self, user, module_name):
|
||||
self.user, self.module_name = user, module_name
|
||||
def __repr__(self):
|
||||
@@ -58,7 +58,7 @@ class PermLookupDict:
|
||||
def __nonzero__(self):
|
||||
return self.user.has_module_perms(self.module_name)
|
||||
|
||||
class PermWrapper:
|
||||
class PermWrapper(object):
|
||||
def __init__(self, user):
|
||||
self.user = user
|
||||
def __getitem__(self, module_name):
|
||||
|
||||
Reference in New Issue
Block a user