summaryrefslogtreecommitdiff
path: root/django/http
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2007-09-11 14:04:40 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2007-09-11 14:04:40 +0000
commit50497e3867564e68050d326b22dc41fe82d79dc0 (patch)
treea9697a6516d3ad9d9ebf3517818e409151772654 /django/http
parentdb01d1d0a8b1d584b025164988de8003c2d29d1c (diff)
Refs #5138 -- Refactored implementation of __contains__ in HttpRequest introduced in [6097] after a suggestion from Malcolm. Applied a similar refactor for MergeDict and Context which had comparable behavior.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/http')
-rw-r--r--django/http/__init__.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py
index 0e1c2a0fbb..20818f138b 100644
--- a/django/http/__init__.py
+++ b/django/http/__init__.py
@@ -38,11 +38,10 @@ class HttpRequest(object):
return d[key]
raise KeyError, "%s not found in either POST or GET" % key
- def __contains__(self, key):
+ def has_key(self, key):
return key in self.GET or key in self.POST
- def has_key(self, key):
- return key in self
+ __contains__ = has_key
def get_full_path(self):
return ''