[Answer]-How to set class to columns in django model formsets

1👍

You can specify attributes in your widgets in the forms :

class ExpenditureForm(forms.ModelForm):

   exp_date = forms.DateField(widget=AdminDateWidget(attrs={'class':'nameOfYourClass'}))

See the full documentation here : https://docs.djangoproject.com/en/dev/ref/forms/widgets/

Leave a comment