Define css class in django Forms

前端 未结 13 786
南旧
南旧 2020-11-27 10:11

Assume I have a form

class SampleClass(forms.Form):
    name = forms.CharField(max_length=30)
    age = forms.IntegerField()
    django_hacker = forms.Boolea         


        
13条回答
  •  失恋的感觉
    2020-11-27 10:23

    Answered my own question. Sigh

    http://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.Widget.attrs

    I didn't realize it was passed into the widget constructor.

提交回复
热议问题