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/
Source:stackexchange.com