summaryrefslogtreecommitdiff
path: root/django/template/context.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/template/context.py')
-rw-r--r--django/template/context.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/template/context.py b/django/template/context.py
index 6d9efdc7ec..25397b0e1a 100644
--- a/django/template/context.py
+++ b/django/template/context.py
@@ -49,6 +49,9 @@ class Context(object):
return True
return False
+ def __contains__(self, key):
+ return self.has_key(key)
+
def get(self, key, otherwise=None):
for d in self.dicts:
if d.has_key(key):
@@ -69,7 +72,7 @@ def get_standard_processors():
i = path.rfind('.')
module, attr = path[:i], path[i+1:]
try:
- mod = __import__(module, '', '', [attr])
+ mod = __import__(module, {}, {}, [attr])
except ImportError, e:
raise ImproperlyConfigured, 'Error importing request processor module %s: "%s"' % (module, e)
try: