How can I order fields in Django ModelForm?
- by joozek
I have an 'order' Model:
class Order(models.Model):
date_time=models.DateTimeField()
# other stuff
And I'm using Django ModelForm class to render a form, but I want to display date and time widgets separately. I've came up with this:
class Form(forms.ModelForm):
class Meta:
model = Order
exclude = ('date_time',)
date =…