diff options
| author | Gary Wilson Jr <gary.wilson@gmail.com> | 2008-08-03 19:55:26 +0000 |
|---|---|---|
| committer | Gary Wilson Jr <gary.wilson@gmail.com> | 2008-08-03 19:55:26 +0000 |
| commit | daa6b38f352447a5afed3184f4ffffd0d6b1f1de (patch) | |
| tree | 9c37742808145821390b64845aa076da44601f70 /django/http | |
| parent | 71b2e01ec29f972482fad5ef6638c7a2d9495697 (diff) | |
Fixed #8092, #3828 -- Removed dictionary access for request objects so that GET and POST data doesn't "overwrite" request attributes when used in templates (since dictionary lookup is performed before attribute lookup). This is backwards-incompatible if you were using the request object for dictionary access to the combined GET and POST data, but you should use `request.REQUEST` for that instead.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/http')
| -rw-r--r-- | django/http/__init__.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py index fe0b93edcf..0124022478 100644 --- a/django/http/__init__.py +++ b/django/http/__init__.py @@ -39,17 +39,6 @@ class HttpRequest(object): (pformat(self.GET), pformat(self.POST), pformat(self.COOKIES), pformat(self.META)) - def __getitem__(self, key): - for d in (self.POST, self.GET): - if key in d: - return d[key] - raise KeyError, "%s not found in either POST or GET" % key - - def has_key(self, key): - return key in self.GET or key in self.POST - - __contains__ = has_key - def get_host(self): """Returns the HTTP host using the environment or request headers.""" # We try three options, in order of decreasing preference. |
