Opened 5 years ago

Closed 3 years ago

Last modified 3 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@… 5 years ago.
Added support for min_num in admin inlines
17642-v2.diff (10.5 KB) - added by Anders Steinlein 3 years ago.
Updated patch.

Download all attachments as: .zip

Change History (23)

comment:1 Changed 5 years ago by krzysztof.szczesny@…

feature added in: #9532

comment:2 Changed 5 years ago by Łukasz Rekucki

Triage Stage: UnreviewedAccepted

Changed 5 years ago by michal@…

Attachment: 17642.patch added

Added support for min_num in admin inlines

comment:3 Changed 5 years ago by Jannis Leidel

Triage Stage: AcceptedReady for checkin

comment:4 Changed 5 years ago by Zbigniew Siciarz

Has patch: set

comment:5 Changed 4 years ago by Claude Paroz

Triage Stage: Ready for checkinAccepted

This depends on #9532 being committed.

comment:6 Changed 4 years ago by Till Backhaus

Owner: changed from nobody to Till Backhaus
Status: newassigned

comment:7 Changed 3 years ago by Tim Graham

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 Changed 3 years ago by Rogério Yokomizo

Cc: Rogério Yokomizo added

comment:9 Changed 3 years ago by Anders Steinlein

Cc: anders@… added

Changed 3 years ago by Anders Steinlein

Attachment: 17642-v2.diff added

Updated patch.

comment:10 Changed 3 years ago by Anders Steinlein

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 Changed 3 years ago by Tim Graham

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

comment:12 Changed 3 years ago by melinath

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 Changed 3 years ago by melinath

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

comment:14 Changed 3 years ago by Tim Graham

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

comment:15 Changed 3 years ago by melinath

@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 Changed 3 years ago by melinath

Owner: changed from Anders Steinlein to melinath

Okay, taking it on.

comment:17 Changed 3 years ago by melinath

@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 Changed 3 years ago by Tim Graham

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

comment:19 Changed 3 years ago by Tim Graham

Owner: changed from melinath 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 Changed 3 years ago by Tim Graham <timograham@…>

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 Changed 3 years ago by Tim Graham <timograham@…>

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

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