How shall I return to my page after a django form has failed validation?

This is what I have at the moment, I return a render_to_response after it has failed with my form objects and all the other objects I need to pass back in. But The url in the browser has the value of the form action and so this seems to me as if I'm doing something wrong. I would prefer if I could somehow return the objects along with a HttpResponseRedirect but looking at the docs that is not possible.

1 Answer
1

Sessions would be good for this, or if you use AJAX you can validate the form, then return your object or some sort of error message or whatever you want after a failure. One or the other would probably be best. You could also pass params from the POST request along as GET query params to the redirected view, or pass arguments to the redirected view: