[Django]-Django form to add item returning 'NoneType' object is not callable error

4👍

You’re using ModelForm with no model associated with it. Create an inner Meta class with model attribute, as per documentation:

class PlayerForm(forms.ModelForm):
    class Meta:
        model = models.Player # or whatever

Also, don’t override save if you don’t really need it.

Leave a comment