ModelAdmin.get_form() should use get_formsets() instead of declared_fieldsets
|Reported by:||edcrypt||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If I override ModelAdmin.get_formset() to return a different set of fields to some users, and don't override ModelAdmin.get_form() too, the fields that I omit on get_fieldsets() are not show, but the admin will save them as None.
If get_form() called get_formset() instead of using the declared_fieldsets property, we wouldn't need to override both.
Change History (3)
comment:1 Changed 6 years ago by edcrypt
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Summary changed from ModelAdmin.get_form() should use get_formsets() instead of declared_fielsets to ModelAdmin.get_form() should use get_formsets() instead of declared_fieldsets
comment:2 Changed 6 years ago by edcrypt
- Resolution set to duplicate
- Status changed from new to closed