Fix display of form validation errors in config forms.

Review Request #6076 — Created July 7, 2014 and submitted

Information

Djblets
release-0.8.x
ce70812...

Reviewers

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.

Description From Last Updated

?

daviddavid

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot
david
  1. 
      
  2. djblets/configforms/views.py (Diff revision 1)
     
     
    Show all issues

    ?

  3. 
      
chipx86
chipx86
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.8.x (c7daeb5)
reviewbot
  1. 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
    
    
  2. djblets/configforms/views.py (Diff revision 1)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  3. 
      
reviewbot
  1. 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
    
    
  2. 
      
reviewbot
  1. 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
    
    
  2. djblets/configforms/views.py (Diff revision 2)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  3.