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
This commit is contained in:
parent
d8deb0c61c
commit
4d75c7aa6e
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue