Issue with Modelform
This is what I got after coding my ModelForm What could have caused that, I kept trying to debug it, but everything seems right, didn’t know where the errors are coming from This was the error I got after running the server, the first form worked out, as I was trying to redirect to another form, this error threw up
raise ValueError ("ModelForm has no model class specified.") ValueError: ModelForm has no model class specified. modelform structure[][1\completemodelform structure]
I want it to work, I’m actually trying to build a web marketplace with Django, the only issue I go was the modelForm error and it really makes me worried
Your ModelForm Meta option should have model
and not Model
. Change the m in Model to lowercase:
class RealBuyerForm(forms.ModelForm):
class Meta:
model = BuyerProfile
exclude = ['user']
Also correct your seller form:
class SellerForm(forms.ModelForm):
class Meta:
model = SellerProfile
exclude = ['user']