aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/parsers.py
diff options
context:
space:
mode:
authorSébastien Piquemal2012-01-22 21:28:34 +0200
committerSébastien Piquemal2012-01-22 21:28:34 +0200
commitab0b72a7c1a17c6d85530514caa51ce5bd77b592 (patch)
tree7ae2c1dab7033ccc6cf045d7df28f8027f1eac17 /djangorestframework/parsers.py
parentd1ce9d3914010ddc9f177ff7d6c1a407efea5a1b (diff)
downloaddjango-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/parsers.py')
-rw-r--r--djangorestframework/parsers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/djangorestframework/parsers.py b/djangorestframework/parsers.py
index c8a014ae..e56ea025 100644
--- a/djangorestframework/parsers.py
+++ b/djangorestframework/parsers.py
@@ -165,9 +165,10 @@ class MultiPartParser(BaseParser):
`data` will be a :class:`QueryDict` containing all the form parameters.
`files` will be a :class:`QueryDict` containing all the form files.
"""
- upload_handlers = self.view.request._get_upload_handlers()
+ # TODO: now self.view is in fact request, but should disappear ...
+ upload_handlers = self.view._get_upload_handlers()
try:
- django_parser = DjangoMultiPartParser(self.view.request.META, stream, upload_handlers)
+ django_parser = DjangoMultiPartParser(self.view.META, stream, upload_handlers)
except MultiPartParserError, exc:
raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
{'detail': 'multipart parse error - %s' % unicode(exc)})