mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 19:40:13 +03:00
fix to maintain request.POST data, whilst also ensuring original change to ensure parsers are indeed called for form post
This commit is contained in:
parent
5214615bff
commit
f2e7fc94d3
|
@ -150,8 +150,8 @@ class Request(object):
|
||||||
Similar to usual behaviour of `request.POST`, except that it handles
|
Similar to usual behaviour of `request.POST`, except that it handles
|
||||||
arbitrary parsers, and also works on methods other than POST (eg PUT).
|
arbitrary parsers, and also works on methods other than POST (eg PUT).
|
||||||
"""
|
"""
|
||||||
#if not _hasattr(self, '_data'):
|
if not _hasattr(self, '_data'):
|
||||||
# self._load_data_and_files()
|
self._load_data_and_files()
|
||||||
return self._data
|
return self._data
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -277,6 +277,8 @@ class Request(object):
|
||||||
return
|
return
|
||||||
|
|
||||||
# At this point we're committed to parsing the request as form data.
|
# At this point we're committed to parsing the request as form data.
|
||||||
|
self._data = self._request.POST
|
||||||
|
self._files = self._request.FILES
|
||||||
self._data, self._files = self._parse()
|
self._data, self._files = self._parse()
|
||||||
|
|
||||||
# Method overloading - change the method and remove the param from the content.
|
# Method overloading - change the method and remove the param from the content.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user