In Django forms, it can check whether the form is valid:
if form.is_valid():
return HttpResponseRedirect('/thanks/')
But I’m missing what to do if it isn’t valid? How do I return the form with the error messages? I’m not seeing the "else" in any of the examples.
If you render the same view when the form is not valid then in template you can access the form errors using
form.errors.An example: