Allow filter_fieldsets to take either ModelAdmin or fieldsets directly
Review Request #9053 — Created July 5, 2017 and submitted
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/.
Description | From | Last Updated |
---|---|---|
The latest diff revision seems to include some other changes. |
david | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
ValueError is probably appropriate here. |
david | |
We should probably verify that admin.fieldsets exists and is iterable. |
david | |
It's probably slightly better to use hasattr here. |
david |
- Change Summary:
-
Flake 8 Fixups
- Diff:
-
Revision 2 (+21 -10)
Checks run (2 succeeded)
- Change Summary:
-
Addressed David's issues.
- Diff:
-
Revision 3 (+23 -10)
Checks run (2 succeeded)
- Change Summary:
-
Some cleanups
- Diff:
-
Revision 4 (+1288 -24)
Checks run (2 succeeded)
- Change Summary:
-
Post correct branch
- Commit:
-
50f66b32048c20017d52813284cb102add8b4bb3
- Diff:
-
Revision 5 (+23 -10)