mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +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:
		| @@ -38,9 +38,12 @@ class HttpRequest(object): | |||||||
|                 return d[key] |                 return d[key] | ||||||
|         raise KeyError, "%s not found in either POST or GET" % 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 |         return key in self.GET or key in self.POST | ||||||
|  |  | ||||||
|  |     def has_key(self, key): | ||||||
|  |         return key in self | ||||||
|  |          | ||||||
|     def get_full_path(self): |     def get_full_path(self): | ||||||
|         return '' |         return '' | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user