1👍
You can use form init method to call class
class YourForm(forms.Form)
def __init__(self, *args, **kwargs):
super(YourForm, self).__init__(*args, **kwargs)
self.fields['field_name'].widget.attrs['class'] = 'your_class'
Source:stackexchange.com