From time to time users of one of my applications has problems with
formsets. More specifically:
...my stuff...
File "/usr/lib/python2.4/site-packages/django/forms/models.py", line
399, in __init__
super(BaseModelFormSet, self).__init__(**defaults)
File "/usr/lib/python2.4/site-packages/django/forms/formsets.py",
line 47, in __init__
self._construct_forms()
File "/usr/lib/python2.4/site-packages/django/forms/formsets.py",
line 91, in _construct_forms
for i in xrange(self.total_form_count()):
File "/usr/lib/python2.4/site-packages/django/forms/formsets.py",
line 70, in total_form_count
return self.management_form.cleaned_data[TOTAL_FORM_COUNT]
File "/usr/lib/python2.4/site-packages/django/forms/formsets.py",
line 57, in _management_form
raise ValidationError('ManagementForm data is missing or has been
tampered with')
ValidationError: [u'ManagementForm data is missing or has been tampered with']
This only happens for Internet Explorer 6, 7 and 8 users. When looking
at the source of the page, all the correct fields are there(even in
the browsers mentioned). When I check request.POST I find all the
fields from the management form(total forms, initial forms and max num
forms). The only difference I can see from the error in the production
environment is that max num forms is missing from request.POST, could
this be causing the error?
Kind regards,
Knut Nesheim