Opened 3 years ago

Closed 15 months ago

Last modified 15 months ago

#17642 closed New feature (fixed)

min_num on admin inline formsets

Reported by: krzysztof.szczesny@… Owned by: timo
Component: contrib.admin Version:
Severity: Normal Keywords: admin min_num formsets
Cc: timo, yokomizor, 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@… 3 years ago.
Added support for min_num in admin inlines
17642-v2.diff (10.5 KB) - added by asteinlein 17 months ago.
Updated patch.

Download all attachments as: .zip

Change History (23)

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

feature added in: #9532

comment:2 Changed 3 years ago by lrekucki

  • Triage Stage changed from Unreviewed to Accepted

Changed 3 years ago by michal@…

Added support for min_num in admin inlines

comment:3 Changed 3 years ago by jezdez

  • Triage Stage changed from Accepted to Ready for checkin

comment:4 Changed 3 years ago by zsiciarz

  • Has patch set

comment:5 Changed 3 years ago by claudep

  • Triage Stage changed from Ready for checkin to Accepted

This depends on #9532 being committed.

comment:6 Changed 2 years ago by tback

  • Owner changed from nobody to tback
  • Status changed from new to assigned

comment:7 Changed 23 months ago by timo

  • Cc timo 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 23 months ago by yokomizor

  • Cc yokomizor added

comment:9 Changed 17 months ago by asteinlein

  • Cc anders@… added

Changed 17 months ago by asteinlein

Updated patch.

comment:10 Changed 17 months ago by asteinlein

  • Owner changed from tback to asteinlein

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 17 months ago by timo

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

comment:12 Changed 15 months 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 15 months ago by melinath

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

comment:14 Changed 15 months ago by timo

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

comment:15 Changed 15 months 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 15 months ago by melinath

  • Owner changed from asteinlein to melinath

Okay, taking it on.

comment:17 Changed 15 months 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 15 months ago by timo

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

comment:19 Changed 15 months ago by timo

  • Owner changed from melinath to timo
  • Patch needs improvement unset
  • Triage Stage changed from Accepted to Ready for checkin

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

comment:20 Changed 15 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

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 15 months 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