﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24626	widgets property doesn't work in ModelForm	Felipe de Morais	nobody	"The widgets property of the ModelForm doesn't work as expected adding a class on the input.


{{{
from django.forms import DateField, CharField, PasswordInput, TextInput
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
from login.models import Fan

class FanForm(UserCreationForm):
    birthday = DateField(input_formats=['%d-%m-%Y', '%d/%m/%Y'])

    class Meta:
        model = Fan
        fields = ['username', 'email', 'first_name', 'last_name', 'birthday', 'gender', 'password1', 'password2']
        widgets = {
            'username': TextInput(attrs={'data': 'meu nome', 'class': 'my-class'}),
        }
}}}"	Bug	closed	Forms	1.7	Normal	invalid			Unreviewed	0	0	0	0	0	0
