On 7/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> In the cases where an existing record is being edited, this doesn't
> really matter, but when a user adds a new record, and I redirect him
> to the page to view all of the objects in that table, if he then hits
> refresh, it adds the record again due to a second form post.

After successfully handling a POST, best practice is to redirect.
This forces the browser to do a GET, and hitting refresh won't do
another post.

I think you can redirect to the same URL, if that view handles GET and
POST differently.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to