I think the problem here is in the view, more specifically, how you're handling the request inside the view.
it seems that you're saving the object no matter what's the request method, that's why even refreshing the page will save a new object.
I had made this form in Django which takes some data and when a save button is clicked it saves it to the database. It stores the data that I give, but I noticed that every time I refreshed the page that contained the form it would automatically save an object with the Id as none and all values set to null. I wanted to know how to write a function that says the form only submits to the database when the save submit button is clicked and not when reloading the page and making a dummy object in the database.
How to solve the error when dummy data gets stored in Django database with its id as none and all values as null