creating forms in views.py:
ffact = formset_factory(Form,extra=somenum]))
fset = ffact(prefix='pfix')
check in views.py:
ffact = formset_factory(Form,extra=3))
fset = ffact(request.POST)
if fset_is.valid():
blah blah
this leads to an exception type: ValidationError at / app / index / Exception value: [u'ManagementForm data is missing or was tampered with] django-docs
mentioned this. I am not sure how to provide management data. I tried something like this ,
try:
fset = ffact(request.POST)
except ValidationError:
fset = None
if fset and fset.is_valid():
blah blah
But still I get the same error. Any ideas? Thank.
source
share