[Fixed]-Using ModelFormMixin without the 'fields' attribute is prohibited

28👍

Your form is not being recognised. This is because you have used form to set the attribute in the view, but the correct attribute is form_class.

(Note, if you correctly set form_class, you don’t need model as well.)

13👍

for me it is fixed by adding fields variable like this

model = xxxxxxxxxx
fields = '__all__'

after model name

refer to this url

Leave a comment