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/parsers.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/parsers.py')
| -rw-r--r-- | djangorestframework/parsers.py | 5 |
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)}) |
