Opened 14 years ago
Last modified 6 years ago
#14688 new Bug
BaseInlineFormSet does not support "auto_id"
Reported by: | Victor Andrée | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | dev |
Severity: | Normal | Keywords: | formsets |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | |||
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
).
According to the ticket's flags, the next step(s) to move this issue forward are:
- To add tests to the patch, then uncheck the "Needs tests" flag on the ticket.
- To improve the patch as described in the pull request review comments or on this ticket, then uncheck "Patch needs improvement".
If creating a new pull request, include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.
Change History (7)
by , 14 years ago
Attachment: | BaseInlineFormset-auto_id.patch added |
---|
comment:1 by , 14 years ago
Needs tests: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:5 by , 6 years ago
Has patch: | unset |
---|---|
Needs tests: | unset |
Patch needs improvement: | unset |
Resolution: | → fixed |
Status: | new → closed |
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 , 6 years ago
Has patch: | set |
---|---|
Needs tests: | set |
Patch needs improvement: | set |
Resolution: | fixed |
Status: | closed → new |
Reopening due to comment on discarded PR.
Adds auto_id to BaseInlineFormSet