• 
      

    Add Meta.fields to all ModelForm instances.

    Review Request #8692 — Created Jan. 31, 2017 and submitted

    Information

    Review Board
    release-3.0.x
    fc8dbf0...

    Reviewers

    A new change in Django 1.8 requires ModelForms to define either fields or
    excludes. This change adds fields to all ModelForms that need it.

    • Ran unit tests.
    • Tested adding a new repository.
    Description From Last Updated

    Where did this requirement come up? The documentation doesn't state these are required, just suggested.

    chipx86chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/reviews/forms.py
          reviewboard/notifications/forms.py
          reviewboard/scmtools/forms.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/reviews/forms.py
          reviewboard/notifications/forms.py
          reviewboard/scmtools/forms.py
      
      
    2. 
        
    brennie
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (bb7dfb4)
    chipx86
    1. 
        
    2. Show all issues

      Where did this requirement come up? The documentation doesn't state these are required, just suggested.

      1. I couldn't find it in the docs either but the code in 1.8 has:

        raise ImproperlyConfigured(
            "Creating a ModelForm without either the 'fields' attribute "
            "or the 'exclude' attribute is prohibited; form %s "
            "needs updating." % name
        )
        
      2. Ah, here it is: https://django.readthedocs.io/en/1.6.x/releases/1.6.html#modelform-without-fields-or-exclude

      3. Huh, interesting. Docs contradict it, but the logic's the same in 1.10. I'll make a note in Notion.

    3.