Skip to content
Advertisement

Post successful but response is an error on front end

I am posting data through 127.0.0.8000/post/. My post is of course successful cause I am able to see what I posted in the base URL of 127.0.0.8000 successfully but I get the following response on the Django front end.

JavaScript

In VS Code I get the following errors in terminal

JavaScript

My Views.Py is the following

JavaScript

P.S I am also unable to GET individual data through ID in the second method, it doesn’t work

Advertisement

Answer

You should return a response instance from your view/API

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement