﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
20347	Add an absolute_max parameter to  formset_factory	Carsten Fuchs	David Smith	"The documentation at https://docs.djangoproject.com/en/1.5/topics/forms/formsets/#limiting-the-maximum-number-of-forms seems to indicate (if I understood it correctly) that the purpose of the `max_num` parameter is to prevent that someone sends a manipulated, excessively large value in the hidden form field that states the number of (extra) forms that are submitted, whereas it is not (directly) related to the number of forms that are //actually// POSTed, or initialized via parameter `initials`.

However, following the example at that page, with `MyInitials` being a list of e.g. 1500 initial values and `request.POST` containing more than 1500 formsets:

{{{
#!python
>>> ArticleFormSet = formset_factory(ArticleForm, extra=0)
>>> formset1 = ArticleFormSet(initial=MyInitials)
>>> formset2 = ArticleFormSet(request.POST)
}}}

Now, accessing `formset1.forms[1000]` throws an IndexError exception.

The `max_num` is at its default value of 1000, but in the above context, it is not expected that `formset1` or `formset2` is reduced to `max_num` forms -- I'd have expected each to have the full number of forms as initialized.

Related thread at django-users: http://thread.gmane.org/gmane.comp.python.django.user/152946
"	New feature	closed	Forms	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
