On 1/6/07, paulh <[EMAIL PROTECTED]> wrote:
The subject is a phrase cut from one of the Django tutorials. In this tutorial the authors say that after successfully processing POST data you should return an HttpResponseRedirect and that this will prevent the user using the back button and taking the action again. I have messed around with the newforms library a bit, but I can't figure out quite how to achieve the effect described above whereby the user is denied use of the back button.
You appear to have misunderstood the intent here (or the tutorial isn't clear enough). The redirect isn't there to _deny_ access to the back button; the redirect pushes the user to another page, so if they _do_ hit the back button, what is displayed is the original HTTP GET that returned the form, not the HTTP POST that submitted the form data. As a result, the user can use their browser history without accidentally resubmitting old form data. If the last page in the browser history was obtained in response to a HTTP POST, pressing back in the browser causes the POST to be resubmitted, which results in the user resubmitting --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---