diff options
| author | Sébastien Piquemal | 2012-01-22 21:28:34 +0200 |
|---|---|---|
| committer | Sébastien Piquemal | 2012-01-22 21:28:34 +0200 |
| commit | ab0b72a7c1a17c6d85530514caa51ce5bd77b592 (patch) | |
| tree | 7ae2c1dab7033ccc6cf045d7df28f8027f1eac17 /djangorestframework/authentication.py | |
| parent | d1ce9d3914010ddc9f177ff7d6c1a407efea5a1b (diff) | |
| download | django-rest-framework-ab0b72a7c1a17c6d85530514caa51ce5bd77b592.tar.bz2 | |
.DATA, .FILES, overloaded HTTP method, content type and content available directly on the request - see #128
Diffstat (limited to 'djangorestframework/authentication.py')
| -rw-r--r-- | djangorestframework/authentication.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/djangorestframework/authentication.py b/djangorestframework/authentication.py index b61af32a..20a5f34a 100644 --- a/djangorestframework/authentication.py +++ b/djangorestframework/authentication.py @@ -95,8 +95,8 @@ class UserLoggedInAuthentication(BaseAuthentication): # Temporarily replace request.POST with .DATA, to use our generic parsing. # If DATA is not dict-like, use an empty dict. if request.method.upper() == 'POST': - if hasattr(self.view.DATA, 'get'): - request._post = self.view.DATA + if hasattr(request.DATA, 'get'): + request._post = request.DATA else: request._post = {} |
