﻿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
13060	ManagementForm exception in case of bad prefix should be easier to understand	Karel	Manav Agarwal	"If user adds multiple formsets with prefixes, and specifies the prefix incorrectly when binding the form and validating:
{{{
some_formset = SomeFormSet(request.POST, 'articles')
}}}

instead of:

{{{ 
some_formset = SomeFormSet(request.POST, prefix='articles') 
}}}

Django ""suppresses"" the original exception and raises only relatively unhelpful ""ManagementForm data is missing or has been tampered with"". 

In file django/forms/formsets.py, line 57:
{{{
  54. if self.data or self.files:
  55.     form = ManagementForm(self.data, auto_id=self.auto_id, prefix=self.prefix)
  56.     if not form.is_valid():
  57.         raise ValidationError('ManagementForm data is missing or has been tampered with') 
}}}

Suggestion: include form._errors in output, because for such a small bug in code, it can take a really long time find it.
{{{
{'INITIAL_FORMS': [u'This field is required.'],
 'MAX_NUM_FORMS': [u'This field is required.'],
 'TOTAL_FORMS': [u'This field is required.']}
}}}"	Cleanup/optimization	closed	Forms	dev	Normal	fixed	formset, ValidationError, ManagementForm	shawntherrien@…	Ready for checkin	1	0	0	0	1	0
