#30306: Textarea widget missing input_type
-------------------------------------+-------------------------------------
Reporter: minusf | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Forms | Version: 2.2
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by minusf):
Closed already? I think this is a fair bit of inconsistency and I would
welcome at least some discussion.
This is not just about not triggering an exception. This is about having
a useful way to identify widget types.
So textareas are the widgets that have no `input_type`? This makes
programmatic widget customisation painful.
As for the value, what's wrong with `'textarea'` ? Select has `select`,
checkbox has `checkbox`, etc. Even `hidden` has one.
Why should `textarea` be different?
{{{
class Input(Widget):
"""
Base class for all <input> widgets.
"""
input_type = None # Subclasses must define this.
<================= my emphasis
template_name = 'django/forms/widgets/input.html'
}}}
While this comment is in `Input` and not `Widget` (and `Textarea` inherits
from `Widget`) the intention and philosophy seems clear to me.
--
Ticket URL: <https://code.djangoproject.com/ticket/30306#comment:2>
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/064.3e255096aa87bf069b4ccefed5f39587%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.