Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@flaugher
Created March 1, 2015 20:03
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flaugher/ec36ec940a31707ac683 to your computer and use it in GitHub Desktop.
Save flaugher/ec36ec940a31707ac683 to your computer and use it in GitHub Desktop.
Things to do if your Django form.is_valid() method fails
- Check that you inserted "request.POST" as an argument to your form when instantiating the form in your view after the POST.
- Add {{ form.errors }} {{ form.non_field_errors }} to the form or debug your view and print them from the debugger.
- Examine each form field in the debugger: myform['<fieldname>'].value()
- Make sure DEBUG = True so that you'll see any server errors.
- Check your server log.
- If all else fails, step through the is_valid() call.
@ratfink88
Copy link

excellent

@bokskog
Copy link

bokskog commented Mar 8, 2019

Helped me! Thanks!

@Quitiweb
Copy link

Helpful. Many thanks!

@Skeysm
Copy link

Skeysm commented Jun 25, 2019

Very Very helpful !!!! Many Thanks !!!!

@BobinMathew
Copy link

Many thanks👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment