7👍
This is occuring is because you are trying to access the data from body
use -> data = json.loads(request.data)
3👍
Use request.data
instead of request.body
.
request.data
does not read the data stream again.
- [Django]-UnicodeEncodeError at /admin/ in Django app
- [Django]-Django 1.7 and smart, deep, filtered aggregations
- [Django]-Django Elastic Beanstalk App – Cannot Set Secure Listener Port to 443: LoadBalancerHTTPSPort
- [Django]-Django: object needs to have a value for field "…" before this many-to-many relationship can be used
- [Django]-Group by in django
0👍
hey thanks for the response but I figured it out! It wasn’t working because I found a small bug where I am able to access the login page even though I am already logged in, so the error was caused by trying to login again. I fixed the issue by redirecting to home page if login page is tried to be reached
- [Django]-Query annotation by distance to find closest distance in Django 1.11 with postgis appears incorrect
- [Django]-How to iterate over several list at the same time?
- [Django]-Django/Python convert PDF using shell (os.system/Popen) not working in production
- [Django]-Python left() equivalent?
Source:stackexchange.com