Assume I have a form
class SampleClass(forms.Form): name = forms.CharField(max_length=30) age = forms.IntegerField() django_hacker = forms.Boolea
You can try this..
class SampleClass(forms.Form): name = forms.CharField(max_length=30) name.widget.attrs.update({'class': 'your-class'}) ...
You can see more information in: Django Widgets