﻿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
30831	Django doesn't respect overriding the maxlength widget attribute for CharFields in ModelForm.	Arsenal591	nobody	"I have the following field in model:


{{{
short_description = models.CharField(max_length=205)
}}}

and the widget in ModelForm:


{{{
'short_description': forms.Textarea(attrs={'rows': '3', 'minlength': 250,'maxlength': 250})
}}}

The issue:

In HTML, input, Django adds correctly minlength value, but for the maxlength value he get the value from the model field and not the one specified in the widget.


{{{
<textarea name=""short_description"" cols=""40"" rows=""3""  minlength=""250"" maxlength=""205"" required="""" id=""id_short_description""></textarea>
}}}
"	Bug	closed	Forms	2.2	Normal	invalid	form, modelform		Unreviewed	0	0	0	0	0	0
