2
You’re trying to instantiate a SurveyForm, rather than a Survey, inside your is_valid block.
But actually you shouldn’t be trying to do either, and you don’t need to set all those fields from cleaned_data: the whole point of using a ModelForm is that you can just do form.save()
and it creates and saves a model instance for you.
Source:stackexchange.com