Kaydet (Commit) 4d75c7aa authored tarafından Malcolm Tredinnick's avatar Malcolm Tredinnick

Fixed #3071 -- added a {{{__contains__}}} method to the Context class. Thanks

akaihola.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4480 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst d8deb0c6
...@@ -49,6 +49,9 @@ class Context(object): ...@@ -49,6 +49,9 @@ class Context(object):
return True return True
return False return False
def __contains__(self, key):
return self.has_key(key)
def get(self, key, otherwise=None): def get(self, key, otherwise=None):
for d in self.dicts: for d in self.dicts:
if d.has_key(key): if d.has_key(key):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment