mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 11:30:12 +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
|
||||
arbitrary parsers, and also works on methods other than POST (eg PUT).
|
||||
"""
|
||||
#if not _hasattr(self, '_data'):
|
||||
# self._load_data_and_files()
|
||||
if not _hasattr(self, '_data'):
|
||||
self._load_data_and_files()
|
||||
return self._data
|
||||
|
||||
@property
|
||||
|
@ -277,6 +277,8 @@ class Request(object):
|
|||
return
|
||||
|
||||
# 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()
|
||||
|
||||
# Method overloading - change the method and remove the param from the content.
|
||||
|
|
Loading…
Reference in New Issue
Block a user