Answers for "how to give class to django html forms filr field"

4

django forms set class

class UserLoginForm(forms.Form):
    username = forms.CharField(widget=forms.TextInput(
        attrs={
        'class':'form-control',
        'placeholder':'Username'
        }
    ))
    password = forms.CharField(widget=forms.PasswordInput(
        attrs={
        'class':'form-control',
        'placeholder':'Password'
        }
    ))
Posted by: Guest on July-19-2020

Code answers related to "how to give class to django html forms filr field"

Python Answers by Framework

Browse Popular Code Answers by Language