Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 4d75c7aa6ef7a477697fbe06658d8bd5ab2d0250 1 parent d8deb0c
@malcolmt malcolmt authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  django/template/context.py
View
3  django/template/context.py
@@ -49,6 +49,9 @@ def has_key(self, key):
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):
Please sign in to comment.
Something went wrong with that request. Please try again.