0

I have normal Django form. As I had a short server delay after pressing the "save" button of my form, I just clicked once more and Oops I have the entries twice in the database.

So my question: I am wondering whether there exists an mechanism which by pressing the save button several times prevents that identical entries are created?

Is a possible solution really hashing the entries like in this post: prevent a form to be submitted multiple times - django

Thanks for your help.

kingbrain
  • 116
  • 12
  • Maybe it can help you: https://stackoverflow.com/questions/5823580/django-form-resubmitted-upon-refresh – Cássio Salvador Jan 17 '18 at 13:15
  • I have a `return HttpResponseRedirect(reverse('customer_subs', args=[pk]))` in my views.py, but seems that it does not solve the problem. – kingbrain Jan 17 '18 at 14:27

0 Answers0