summaryrefslogtreecommitdiff
path: root/django/forms/fields.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-09-10 19:21:29 +0200
committerClaude Paroz <claude@2xlibre.net>2012-09-10 19:31:11 +0200
commitf1bdfbd24bcc76d21c4bf7442959bdf630ac4dec (patch)
tree5ca2a6f040a5106253d1ffdb3ad179d544b83211 /django/forms/fields.py
parent611a2b266b2f57f42e4a3f0ac04d560e805c08cf (diff)
Document and test 'type' usage in Widget attrs
Refs #16630.
Diffstat (limited to 'django/forms/fields.py')
-rw-r--r--django/forms/fields.py2
1 files changed, 1 insertions, 1 deletions
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