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:
Malcolm Tredinnick 2007-02-10 09:02:00 +00:00
parent d8deb0c61c
commit 4d75c7aa6e
1 changed files with 3 additions and 0 deletions

View File

@ -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):