Django 'managementform Data Is Missing Or Has Been Tampered With' When Saving Modelforms With Foreign Key Link
I am rather new to Django so this may be an easy question. I have 2 modelForms where there is a ForeignKey to another. My main goal is to save Indicators with a link to Disease (FK
Solution 1:
You have neither diseaseFormSet
nor diseaseFormSet
's management form in your template, yet you try to instantiate the formset. Formsets require the hidden management form which tells django how many forms are in the set.
Insert this into your HTML
{{ diseaseFormSet.as_table }}
{{ diseaseFormSet.management_form }}
Post a Comment for "Django 'managementform Data Is Missing Or Has Been Tampered With' When Saving Modelforms With Foreign Key Link"