Django: do I need to do HttpResponseRedirect to render a simple string after a POST?
        Posted  
        
            by AP257
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by AP257
        
        
        
        Published on 2010-03-15T18:06:09Z
        Indexed on 
            2010/03/15
            18:09 UTC
        
        
        Read the original article
        Hit count: 230
        
django
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!
© Stack Overflow or respective owner