1đź‘Ť
- Just send the post request with data =
$("#theForm").serialize()
, it should include the csrftoken etc … - Use firebug or webkit inspector (press F12) to monitor the post requests made by the website.
- If the server responds with an error, actually do read the traceback in the response using the inspector.
- If the server doesn’t respond with an error, do read the response in the inspector too.
it seems that form is not valid
“We can’t stop here, this is bat land.” Is it valid or not ? If it’s not valid then the view should respond appropriately, and the javascript should be able to use that response to inform the user that the form is not valid.
In case you need to trace the Python code, put in your view import pdb; pdb.set_trace()
so that you can debug it properly and see if it’s valid or not and also what is it doing.
Also, you didn’t post your view code. Anyway, I think that point 1. should work.
👤jpic
Source:stackexchange.com