#20440: forms.CharField should return an exception if max_length is not an
integer
-------------------------------+--------------------
Reporter: tome | Owner: nobody
Type: Uncategorized | Status: new
Component: Forms | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
In ''models.CharField'' you can define a verbose_name by placing a string
as the first parameter, i.e. ''models.CharField("foo")''
If you by mistake happen to define a ''forms.CharField'' with the same
pattern, i.e. ''forms.CharField("foo")'', there will be no error message
and the input field will be rendered with the attribute
''maxlength="foo"'' which is invalid.
The proposed solution is to attempt to cast non-empty ''max_length'' and
''min_length'' values to an int in the init method of CharField.
--
Ticket URL: <https://code.djangoproject.com/ticket/20440>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.