summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/template/context.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/template/context.py b/django/template/context.py
index ba23e95ab7..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):