Allow filter_fieldsets to take either ModelAdmin or fieldsets directly

Review Request #9053 - Created July 5, 2017 and submitted

Barret Rennie
Djblets
release-0.10.x
9056
50f66b3...
djblets

Previously, you had to specify the actual ModelAdmin class to retrieve
fieldsets from. This is no longer the case and the fieldsets themselves
can be passed instead.

The documentation for what the function does has also been improved.

Tested with /r/9056/.

  • 0
  • 0
  • 6
  • 0
  • 6
Description From Last Updated
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

Barret Rennie
David Trowbridge
  1. 
      
  2. djblets/forms/fieldsets.py (Diff revision 2)
     
     

    ValueError is probably appropriate here.

  3. djblets/forms/fieldsets.py (Diff revision 2)
     
     
     

    We should probably verify that admin.fieldsets exists and is iterable.

  4. 
      
Barret Rennie
Barret Rennie
David Trowbridge
  1. 
      
  2. The latest diff revision seems to include some other changes.

  3. 
      
Barret Rennie
David Trowbridge
  1. 
      
  2. djblets/forms/fieldsets.py (Diff revision 5)
     
     

    It's probably slightly better to use hasattr here.

  3. 
      
Barret Rennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.10.x (6c8424f)
Loading...