From f1bdfbd24bcc76d21c4bf7442959bdf630ac4dec Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Mon, 10 Sep 2012 19:21:29 +0200 Subject: Document and test 'type' usage in Widget attrs Refs #16630. --- django/forms/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/forms/fields.py') diff --git a/django/forms/fields.py b/django/forms/fields.py index 7f0d26d1aa..124e4f669a 100644 --- a/django/forms/fields.py +++ b/django/forms/fields.py @@ -199,7 +199,7 @@ class CharField(Field): def widget_attrs(self, widget): attrs = super(CharField, self).widget_attrs(widget) - if self.max_length is not None and isinstance(widget, (TextInput, PasswordInput)): + if self.max_length is not None and isinstance(widget, TextInput): # The HTML attribute is maxlength, not max_length. attrs.update({'maxlength': str(self.max_length)}) return attrs -- cgit v1.3