Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#11752 closed (duplicate)

ModelAdmin.get_form() should use get_formsets() instead of declared_fieldsets

Reported by: edcrypt Owned by: nobody
Component: contrib.admin Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

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

Marking as duplicated of #9360, sorry.

comment:3 Changed 4 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top