Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixed #9532 - Allowed to define Formsets min_num #784

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

tback commented Feb 23, 2013

Allowed to define the minimum number of forms in a Formset

@gnosek gnosek commented on an outdated diff Feb 23, 2013

django/forms/formsets.py
"""Return a FormSet for the given form class."""
if max_num is None:
max_num = DEFAULT_MAX_NUM
+ if min_num > max_num:
+ raise ValueError("min_num(%d) must less or equal than max_num(%d)"
@gnosek

gnosek Feb 23, 2013

Contributor

"min_num (%d) must be less than or equal to max_num (%d)"?

@ptone ptone commented on the diff Feb 24, 2013

django/forms/formsets.py
"""Return a FormSet for the given form class."""
if max_num is None:
max_num = DEFAULT_MAX_NUM
+ if min_num > max_num:
@ptone

ptone Feb 24, 2013

Member

this should probably compare to absolute_max below

tback added some commits Feb 23, 2013

@tback tback closed this Mar 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment