Skip to content
New issue

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

[BUG] request.DATA usage removed in Django Rest Framework 3.2 #96

Closed
erj1 opened this issue Aug 7, 2015 · 7 comments
Closed

[BUG] request.DATA usage removed in Django Rest Framework 3.2 #96

erj1 opened this issue Aug 7, 2015 · 7 comments

Comments

@erj1
Copy link

erj1 commented Aug 7, 2015

Using django-rest-auth 4.0, and upgraded to djangorestframework 3.2 and received the following exception when testing the registration route:

NotImplementedError at /rest-auth/registration/
request.DATA has been deprecated in favor of request.data since version 3.0, and has been fully removed as of version 3.2.

request.DATA is appears to be called from rest_framework/request.py line 40.

@JeansReal
Copy link

Hi!, yes the same bug here
on views.py

class Login(GenericAPIView):
def post(self, request, _args, *_kwargs):
self.serializer = self.get_serializer(data=self.request.DATA) # This line request.DATA

@illing2005
Copy link

There is already a pull request by @alacritythief solving this.
#94

@erj1 erj1 closed this as completed Aug 10, 2015
@erj1
Copy link
Author

erj1 commented Aug 10, 2015

Thanks.

@gladsonvm
Copy link

Is pip package updated on this issue?

@holms
Copy link

holms commented Aug 20, 2015

C'mon I have the same issue, this version is unsable with django-tests at all.

@gladsonvm
Copy link

I followed stack trace of error and just replaced request.DATA with request.data in those files which generated errors as per the stack trace. Then It worked fine for me. However I dont know whether it is compatible with django-tests. May be request.DATA have to be replaced with request.data for django-tests.

@holms
Copy link

holms commented Aug 20, 2015

Ok it does work from master branch, putting git repo link to requirements.txt solved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants