Opened 15 years ago

Last modified 4 months ago

#14688 assigned Bug

BaseInlineFormSet does not support "auto_id"

Reported by: Victor Andrée Owned by: Zeth
Component: Forms Version: dev
Severity: Normal Keywords: formsets
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

BaseInlineFormSet.__init__ does not accept the auto_id argument, unlike its ancestors. Furthmore, its parent BaseModelFormSet takes **kwargs and passes them along.

I can't think of a good reason for this omission/difference. I've attached a small patch to "match" BaseInlineFormSet.__init__ with BaseModelFormSet.__init__. The patch puts the "new" auto_id argument last in order to maximize backwards compatibility (the order is different for BaseModelFormSet).

Arguably, both prefix and auto_id could be removed from the explicit arg list since they're just passed along (in both BaseModelFormSet and BaseInlineFormSet).

Attachments (1)

BaseInlineFormset-auto_id.patch (1.3 KB ) - added by Victor Andrée 15 years ago.
Adds auto_id to BaseInlineFormSet

Download all attachments as: .zip

Change History (9)

by Victor Andrée, 15 years ago

Adds auto_id to BaseInlineFormSet

comment:1 by Russell Keith-Magee, 15 years ago

Needs tests: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

comment:2 by James Addison, 14 years ago

Severity: Normal
Type: Bug

comment:3 by Aymeric Augustin, 14 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:4 by Aymeric Augustin, 14 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:5 by Tobias Kunze, 6 years ago

Has patch: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: fixed
Status: newclosed

This issue has been fixed some time ago: In e308cfc0e15 (7 years ago, a year after this issue was opened), BaseInlineFormSet started passing **kwargs in its super() call.

comment:6 by Nick Pope, 6 years ago

Has patch: set
Needs tests: set
Patch needs improvement: set
Resolution: fixed
Status: closednew

Reopening due to comment on discarded PR.

comment:7 by Zeth, 4 months ago

Needs tests: unset
Owner: changed from nobody to Zeth
Patch needs improvement: unset
Status: newassigned

comment:8 by Fabian Braun, 4 months ago

Patch needs improvement: set
Note: See TracTickets for help on using tickets.
Back to Top