« first day  last day (14 days later) » 

12:00 AM
if you type "deletGame" into the console tab in your browser dev tools it will tell you what t thinks "deleteGame" is
 
the form still submits
If it type deleteGame() into the search bar, it finds the function exactly where it should be.
 
Hi
try to type deleteGame() into developer console in your browser
in most of browsers you can invoke it by pressing F12 (sometimes you will have to change the tab in debugger to "console"
 
I've only got one more suggestion TK, try returning false from the function to prevent the form submitting. It's a bit strange to remove a DOM element when submitting a form
 
Ok, I just found out what might be causing this. It has something to do with my form. After I delete the game I use return HttpResponseRedirect('/userprofile'). But I also make that same return when I'm saving the form (as opposed to deleting it). However, it I eliminate the second return HttpResponseRedirect('/userprofile'), the deleteGame() works perfectly fine. It's only when I have return HttpResponseRedirect('/userprofile') a second time, that it doesn't work.
I have no clue how this is causing the error that it does, and I still haven't found a way to make the form be able to both save AND delete properly.
 
12:26 AM
I added an edit to the question with the relevant code.
 

« first day  last day (14 days later) »