I am submitting a form. After that i am doing HttpResponseRedirect
so that the form wont be submitted if one i refresh the page. BUT, if i go back
in browser and submit the form again, the form will be saved multiple times. How can i prevent this?
I thought of session, meaning i set a session name like this:
if request.session.get('saved', False):
return HttpResponseRedirect('/already_saved/')
entry.save() # <-- pseudo save
request.session['saved'] = True
but this causes that the user can never send another form in my page in his actual session.
how can I create unique sessions for each form, so that one form doesnot get submitted multiple times but it is still possible to submit another forms?