Why Djnago Form Is Invalid? How to Print Errors?
Aug. 19, 2022
django
Working with complex views that process multiple forms you can stuck on situation when some of forms didn’t validated but you have not see a reason for this, to debug this you can print forms errors from the view POST
method.
form.is_valid()
print(form.errors)