I keep getting the error:
[u'ManagementForm data is missing or has been tampered with']
I can't figure out why either. Here is my view:
def CreateWorkout(request):
WorkoutInlineFormSet = inlineformset_factory(workout,exercise)
if request.method == "POST" :
formset = WorkoutInlineFormSet(request.POST)
if formset.is_valid():
formset.save();
else:
formset = WorkoutInlineFormSet()
return render_to_response('submit.html',{'formset': formset},context_instance=RequestContext(request))
And here is my template:
<body>
<form method="POST" action ="">
{{ formset.management_form }}
<table>
{% for form in formset.forms %}
{{ form }}
{% endfor %}
</table>
</form>
</body>
I've read that you have to include the formset.management_form
, and I have. I thought that would be an easy fix, but I haven't been able to figure out the problem.