Fix display of form validation errors in config forms.
Review Request #6076 — Created July 7, 2014 and submitted
The config forms code wasn't allowing errors to be shown on the forms,
and had other issues that prevented proper error reporting:1. We didn't implement a post() function on the view, meaning that
TemplateView would default to a Method Not Allowed.2. We weren't replacing the form instance within the page, resulting in
a clean form being used, free of errors.3. We weren't showing non-field errors on the form.
This fixes these cases so that form validation errors will be shown
correctly.It also moves all the POST handling into the new post() function, where
it really belongs.
Successfully saved new form data.
Failed to fill out a required field, and saw the proper validation error.
- Change Summary:
-
Fixed some code that didn't get removed.
- Commit:
-
a59aa5b5a954a8608d4da3b59041c4f2a571a8fdf290b35f65afab678d5d504254a90d8790e4f8f1
- Change Summary:
-
For real this time (committed code to the wrong branch...)
- Commit:
-
f290b35f65afab678d5d504254a90d8790e4f8f1ce7081252c3f9c076cec429555eff75ddcacef99
-
Tool: Pyflakes Processed Files: djblets/configforms/views.py Ignored Files: djblets/configforms/templates/configforms/config_page_form.html Tool: PEP8 Style Checker Processed Files: djblets/configforms/views.py Ignored Files: djblets/configforms/templates/configforms/config_page_form.html
-
-
Tool: PEP8 Style Checker Processed Files: djblets/configforms/views.py Ignored Files: djblets/configforms/templates/configforms/config_page_form.html Tool: Pyflakes Processed Files: djblets/configforms/views.py Ignored Files: djblets/configforms/templates/configforms/config_page_form.html