1
0
mirror of https://github.com/django/django.git synced 2025-04-04 21:46:40 +00:00

Fixed #5318 -- Added __contains__ method to HttpRequest, mirroring existing has_key method. Thanks for the patch, robbie@prelab.net.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2007-09-11 13:36:09 +00:00
parent 7115465afa
commit db01d1d0a8

View File

@ -38,9 +38,12 @@ class HttpRequest(object):
return d[key]
raise KeyError, "%s not found in either POST or GET" % key
def has_key(self, key):
def __contains__(self, key):
return key in self.GET or key in self.POST
def has_key(self, key):
return key in self
def get_full_path(self):
return ''