We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm not sure if Django uses request.data still, but django-rest-framework requires request.data instead of request.DATA.
Django
request.data
django-rest-framework
request.DATA
Changing it for the lowercase version in api_request would make it easy to write test when the request is set as a view attribute in tests.
api_request
Example:
view = MyView() view.request = self.create_request(data={})
The text was updated successfully, but these errors were encountered:
request.DATA is a remnant of DRF 2, and can be replaced in newer versions.
Django used to have request.REQUEST, which was similar.
request.REQUEST
Sorry, something went wrong.
No branches or pull requests
I'm not sure if
Django
usesrequest.data
still, butdjango-rest-framework
requiresrequest.data
instead ofrequest.DATA
.Changing it for the lowercase version in
api_request
would make it easy to write test when the request is set as a view attribute in tests.Example:
The text was updated successfully, but these errors were encountered: