Opened 16 years ago

Closed 16 years ago

Last modified 16 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: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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 16 years ago.
Patch adds the prefix= kwarg to generic inline formsets. Includes a new test.

Download all attachments as: .zip

Change History (5)

by Antti Kaihola, 16 years ago

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

comment:1 by Alex Gaynor, 16 years ago

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

comment:2 by Alex Gaynor, 16 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

comment:3 by Russell Keith-Magee, 16 years ago

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 by Russell Keith-Magee, 16 years ago

(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