Hi all,
using Django 1.5.1, having read
<https://docs.djangoproject.com/en/1.5/topics/forms/formsets/#limiting-the-maximum-number-of-forms>,
I still have trouble creating a formset with more than 1000 initial forms:
Following the example at that page, what I'd like to do is, with MyInitials being a list
of e.g. 1500 initial values:
>>> ArticleFormSet = formset_factory(ArticleForm, extra=0)
>>> formset = ArticleFormSet(initial=MyInitials)
Now, accessing formset.forms[1000] throws an IndexError exception.
I understand that this is related to the "Formset denial-of-service" issue mentioned at
https://www.djangoproject.com/weblog/2013/feb/19/security/, but isn't max_num supposed
to limited the number of *extra* formsets only?
It is relatively easy to work-around my original problem:
>>> ArticleFormSet = formset_factory(ArticleForm, max_num=30000, extra=0)
but shouldn't a larger number of initials automatically extend the max_num?
Best regards,
Carsten
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.