1👍
✅
Just set the fields
attribute in Meta
:
class PropertyBuildingForm(ModelForm):
block = forms.CharField(widget = forms.Select())
class Meta:
model = PropertyBuilding
fields = ('block', 'year_built', 'number_of_floors')
Source:stackexchange.com