Error:
python django.core.exceptions.ImproperlyConfigured: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited; form BuildingAdminForm needs updating.
Fix:
Add fields = "__all__" inn Meta class of your model form
class MyAdminForm(forms.ModelForm):
class Meta:
model = MyModel
fields = "__all__"
python django.core.exceptions.ImproperlyConfigured: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited; form BuildingAdminForm needs updating.
Fix:
Add fields = "__all__" inn Meta class of your model form
class MyAdminForm(forms.ModelForm):
class Meta:
model = MyModel
fields = "__all__"
No comments:
Post a Comment