#30306: Textarea widget missing input_type
-----------------------------------------+------------------------
Reporter: minusf | Owner: nobody
Type: Uncategorized | Status: new
Component: Forms | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-----------------------------------------+------------------------
(I tried to search for this both in here and the pull requests on github
but there is an eerie quiet about it.)
`Textarea` seems to be one of the few (if not the only) widget not
defining `input_type`.
I can't think of a good reason why it couldn't have one and some people
find out about this strange omission when they try to do something like:
{{{
for field in self.fields:
widget = self.fields[field].widget
if widget.input_type == "select":
...
elif widget.input_type == "checkbox":
...
}}}
but end up with:
{{{
...
AttributeError: 'Textarea' object has no attribute 'input_type'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30306>
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/049.8f59bd71c15b3a4624059abb30179955%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.