Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#10281 closed (fixed)

generic inline formsets don't allow custom prefix

Reported by: Antti Kaihola Owned by: Brian Rosner
Component: Contrib apps Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Generic inline formset classes created with generic_inlineformset_factory() don't accept the prefix= keyword argument. They constructs the prefix from the app, model and generic relation field names instead.

The inability to override the prefix is not consistent with other form and formset classes, which all do accept the prefix= kwarg.

Attachments (1)

10281-generic-inline-formset-prefix.diff (2.3 KB) - added by Antti Kaihola 8 years ago.
Patch adds the prefix= kwarg to generic inline formsets. Includes a new test.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Antti Kaihola

Patch adds the prefix= kwarg to generic inline formsets. Includes a new test.

comment:1 Changed 8 years ago by Alex Gaynor

FWIW this was added in the patch on #10271 as well, as it was necessary to write the actual patch :)

comment:2 Changed 8 years ago by Alex Gaynor

Has patch: set
Triage Stage: UnreviewedAccepted

comment:3 Changed 8 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [10017]) Fixed #10271, #10281 -- Fixed the handling multiple inline models that share a common base class and have the link to the inline parent on the base class. Includes modifications that allow the equivalent handling for GenericFields. Thanks to Idan Gazit, Antti Kaihola (akaihola), and Alex Gaynor for their work on this patch.

comment:4 Changed 8 years ago by Russell Keith-Magee

(In [10019]) [1.0.X] Fixed #10271, #10281 -- Fixed the handling multiple inline models that share a common base class and have the link to the inline parent on the base class. Includes modifications that allow the equivalent handling for GenericFields. Thanks to Idan Gazit, Antti Kaihola (akaihola), and Alex Gaynor for their work on this patch.

Backport of r10017 from trunk.

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