Opened 5 hours ago

Closed 5 hours ago

#35922 closed New feature (wontfix)

Allow easier customization of BaseFormSet.management_form

Reported by: Christophe Henry Owned by:
Component: Forms Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

BaseFormSet's ManagementForm is currently entirely generated in BaseFormSet.management_form which makes it hard to customize, especially since BaseFormSet is designed to work in a very particular way with a JS front which prevents other possible but more exotic behavior.

I propose to make ManagementForm creation more flexible by adding a management_form_class class attribute and constructor argument to BaseFormSet as well as a formset_factory argument and add a get_management_form_kwargs method to ManagementForm to easier alternative implementations of ManagementForm/

Change History (1)

comment:1 by Mariusz Felisiak, 5 hours ago

Resolution: wontfix
Status: newclosed

This looks extremely niche, and you can always override the management_form property if you've already fallen down that deep rabbit hole. Every new option (even a small one) makes it harder to maintain and more confusing for newcommers ("Death by a Thousand Cuts").

Please ​follow ​triaging guidelines with regards to wontfix tickets and take this to DevelopersMailingList, if you don't agree.

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