Opened 13 years ago

Closed 11 years ago

Last modified 4 years ago

#17642 closed New feature (fixed)

min_num on admin inline formsets

Reported by: krzysztof.szczesny@… Owned by: Tim Graham
Component: contrib.admin Version:
Severity: Normal Keywords: admin min_num formsets
Cc: Tim Graham, Rogério Yokomizo, anders@…, stephen.r.burrows@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

the min_num parameter should be supported in admin inlines

Attachments (2)

17642.patch (11.4 KB ) - added by michal@… 13 years ago.
Added support for min_num in admin inlines
17642-v2.diff (10.5 KB ) - added by Anders Steinlein 11 years ago.
Updated patch.

Download all attachments as: .zip

Change History (25)

comment:1 by krzysztof.szczesny@…, 13 years ago

feature added in: #9532

comment:2 by Łukasz Rekucki, 13 years ago

Triage Stage: UnreviewedAccepted

by michal@…, 13 years ago

Attachment: 17642.patch added

Added support for min_num in admin inlines

comment:3 by Jannis Leidel, 13 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Zbigniew Siciarz, 13 years ago

Has patch: set

comment:5 by Claude Paroz, 12 years ago

Triage Stage: Ready for checkinAccepted

This depends on #9532 being committed.

comment:6 by Till Backhaus, 12 years ago

Owner: changed from nobody to Till Backhaus
Status: newassigned

comment:7 by Tim Graham, 11 years ago

Cc: Tim Graham added
Patch needs improvement: set

I just committed #9532 so this is now unblocked. It would be great to get this in to 1.7 as well. The patch here needs to be updated -- there's also a branch from tback on #9532 which addresses some of this.

comment:8 by Rogério Yokomizo, 11 years ago

Cc: Rogério Yokomizo added

comment:9 by Anders Steinlein, 11 years ago

Cc: anders@… added

by Anders Steinlein, 11 years ago

Attachment: 17642-v2.diff added

Updated patch.

comment:10 by Anders Steinlein, 11 years ago

Owner: changed from Till Backhaus to Anders Steinlein

I updated the patch, see attached 17642-v2.diff or my branch on github: https://github.com/asteinlein/django/tree/min_num-admin-inline

I would love to get this into 1.7, so I'll be quick to update the patch after any feedback.

comment:11 by Tim Graham, 11 years ago

I created a pull request from the branch and left some comments.

comment:12 by Stephen Burrows, 11 years ago

Cc: stephen.r.burrows@… added

Just ran into this... it seems like a pretty serious oversight that this wasn't implemented for model formsets/inline formsets back when the functionality was introduced in the first place. Would love to see it fixed. :-)

comment:13 by Stephen Burrows, 11 years ago

... and then I noticed that the functionality itself was just added in 1.7.

comment:14 by Tim Graham, 11 years ago

@melinath, if you would like to update the PR per my comments that will expedite this getting fixed.

comment:15 by Stephen Burrows, 11 years ago

@timo: Yeah... I was hoping asteinlein would pop out of the shadows. :-p I'm already working on another patch for django, and I want to wait until it's done before I take another one on. Barring a massive influx of free time.

comment:16 by Stephen Burrows, 11 years ago

Owner: changed from Anders Steinlein to Stephen Burrows

Okay, taking it on.

comment:17 by Stephen Burrows, 11 years ago

@timo: I've run into some strange behavior - see my note on #9532. Would it be reasonable for me to integrate a fix into just the modelformset behavior, in your opinion?

comment:18 by Tim Graham, 11 years ago

Yes, a separate PR to address that issue would be best.

comment:19 by Tim Graham, 11 years ago

Owner: changed from Stephen Burrows to Tim Graham
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

I will give this a final review and merge it tomorrow.

comment:20 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 2914f66983a92fcae55673c517dd8d01e8c238c4:

[1.7.x] Fixed #17642 -- Added min_num support to modelformsets, inlines, and the admin.

Thanks Stephen Burrows for work on the patch as well.

comment:21 by Tim Graham <timograham@…>, 11 years ago

In 4ef10f245ada0c7d5ae8dc31eebffa63790d40fb:

Fixed #17642 -- Added min_num support to modelformsets, inlines, and the admin.

Thanks Stephen Burrows for work on the patch as well.

Forwardport of 2914f66983a92fcae55673c517dd8d01e8c238c4 from stable/1.7.x

comment:22 by GitHub <noreply@…>, 4 years ago

In 13704b0:

Refs #17642 -- Doc'd min_num and validate_min arguments in modelformset_factory() docs.

Changed arguments ordering to match the modelformset_factory()
signature.

comment:23 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 6eb0f4f7:

[3.1.x] Refs #17642 -- Doc'd min_num and validate_min arguments in modelformset_factory() docs.

Changed arguments ordering to match the modelformset_factory()
signature.

Backport of 13704b057d3c77d9442a150f79d8fad34bcdb995 from master.

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