On 15/03/2012, at 5:32 AM, Gelonida N wrote:

> Hi,
> 
> I'm having a django view, that works for GET and POST requests.
> 
> Basically une can view some data with GET
> and add / moify data with a tiny form and POST
> 
> As the data can change I added a refresh button and this works fine.
> 
> The problem is just, that some users don't use it but insist on using
> the F5 (reload) key of their browser.
> 
> 
> F5 works also well if the previous request was a GET request.
> 
> However if the previous request was a POST request the browser rebosts
> and fould thus add some data a second time.
> 
> 
> Now my question:
> 
> How to fix this best I have some (untested) ideas, but am not sure
> what's best.
> 
> 1.) redirect to same url after post.

Redirect after post is the right approach. So much so, that it is stated as the 
right approach (and described as "just good Web development practice") in 
Django's tutorial 4.

Yours,
Russ Magee %-)

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to