[Fixed]-Django ModelForm error

1👍

To retrieve the form use get_form instead as it does some initialization:

form = self.get_form()

If you don’t pass a form_class to get_form() then it will default to the whatever get_form_class() returns.

👤Soviut

Leave a comment