1👍
✅
You have a number of issues in your __init__
method.
The one that’s causing your actual problem is that you are not passing args and kwargs on to the superclass method. So the form data is never actually assigned, so is_valid can never be true. You should be doing this:
super(QuestionForm, self).__init__(*args, **kwargs)
Just as important, though, that super call should not be indented inside the if
statement. You need to make that call whatever happens. The easiest fix here would be to move it to before the if
.
Source:stackexchange.com