question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
gladsonvmcommented, Aug 20, 2015

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.

0reactions
holmscommented, Aug 20, 2015

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

3.2 Announcement - Django REST framework
DATA was put on the deprecation path in 3.0. It has now been removed and its usage will result in an error. Use...
Read more >
Django Rest Framework: issue with request.data
I get the following error when I attempt to POST. 'WSGIRequest' object has no attribute 'data'. Here is the code for the view.py...
Read more >
Middleware - Django documentation
Activating middleware¶ ... To activate a middleware component, add it to the MIDDLEWARE list in your Django settings. ... A Django installation doesn't...
Read more >
django-simple-history — django-simple-history 3.2.0.post40+ ...
django-simple-history stores Django model state on every create/update/delete. ... Fixed bug where serializer of djangorestframework crashed if used with ...
Read more >
django-axes - PyPI
Fix django.contrib. · Change IP address resolution to allow empty or missing addresses. [aleksihakli] · Add error logging for missing request attributes in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found