Code

Opened 5 years ago

Closed 9 months ago

#10607 closed New feature (duplicate)

Use 'get_fieldset' to retieve fieldsets for inline related forms

Reported by: juriejan Owned by: juriejan
Component: contrib.admin Version: master
Severity: Normal Keywords: fieldsets inline related
Cc: juriejanbotha@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Previously the fieldsets for inline related forms where determined only once and then reused for the entire formset. This prevented me from overriding the 'get_fieldset' class in order to alter fieldsets as I wished for specific situations.

With my patch the 'get_fieldsets' method of the InlineModelAdmin class will be called for every form in the formset, allowing for an override that can customize behavior. (As I believe was the original intention with the 'get_fieldset' method)

Attachments (1)

inline-fieldsets.diff (3.5 KB) - added by juriejan 5 years ago.
inline form fieldsets retrieved from 'get_fieldsets' method

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by juriejan

inline form fieldsets retrieved from 'get_fieldsets' method

comment:1 Changed 5 years ago by juriejan

  • Cc juriejanbotha@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 5 years ago by juriejan

  • Has patch set

comment:3 Changed 5 years ago by jacob

  • Triage Stage changed from Unreviewed to Design decision needed

comment:4 Changed 3 years ago by SmileyChris

  • Severity set to Normal
  • Type set to New feature

comment:5 Changed 3 years ago by julien

  • Easy pickings unset
  • Needs tests set
  • Patch needs improvement set
  • Triage Stage changed from Design decision needed to Accepted
  • UI/UX unset

It'd make sense to allow more granularity in the control of inline fieldsets. The admin codebase has changed greatly since 3 years ago so the patch needs to be updated. Some tests would also be required.

comment:6 Changed 9 months ago by timo

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #18681, I believe.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.