[Answer]-How to order a Model form field created dynamically in Django

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')
👤Yossi

Leave a comment