#25124: Make it easier to use a custom Select widget subclass in a
SelectDateWidget
-------------------------------------+-------------------------------------
Reporter: georgebrock | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Forms | Version: 1.8
Severity: Normal | Keywords: forms widgets
| SelectDateWidget
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
The current implementation of `SelectDateWidget` always uses the `Select`
widget for the individual year, month, and day selects. If we moved the
reference to `Select` to an attribute of the `SelectDateWidget` class, it
would be easier to override.
Sometimes it's useful to use a different widget, e.g. in a recent project
I wanted to use a `Select` subclass that wrapped the rendered widget in a
`<div>` for styling reasons. This involved subclassing `SelectDateWidget`
and duplicating the whole `SelectDateWidget.create_select` method, which
does quite a lot of work, just to change one class name.
I'm happy to put together a pull request for this, but the contributing
guidelines said that PRs without Trac tickets would be closed, so here's
the Trac ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/25124>
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/054.061e88228db064c500d3f48199c73603%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.