Django: do I need to do HttpResponseRedirect to render a simple string after a POST?
- by AP257
I've got a mobile app that makes POST requests to a Django site. I want to return a simple string (not a template-based page) after the app makes the POST request, saying 'Success' or 'Failure' as appropriate.
However I know that after a POST request in Django you're supposed to do a HttpResponseRedirect. But, do I really need to redirect to another page and write a new function to handle it, all to output a string?
And if so, how do I pass the success/failure status of the app in the HttpResponseRedirect, since it's only supposed to take one argument?
Thanks!