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


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.)


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