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.
Source:stackexchange.com