[Django] #28864: Allow overriding the default dropdown list for the time widget in Django admin

3 views
Skip to first unread message

Django

unread,
Nov 29, 2017, 8:20:27 PM11/29/17
to django-...@googlegroups.com
#28864: Allow overriding the default dropdown list for the time widget in Django
admin
---------------------------------------------+------------------------
Reporter: jeffrey k eliasen | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
Right now all time widgets in the admin offer a dropdown list of times to
enter, but the list is only 5 times: "now", "6 am", "noon", "6 pm", and
"midnight". For most use cases this list is not practical.

I propose altering the javascript so that the user can either override a
javascript function that builds the list or (better) alter the widget so
that details about the start time, stop time, and minutes increment are
provided as parameters on the TimeField or DateTimeField.

I will be creating a PR for this change in the next week or so.

--
Ticket URL: <https://code.djangoproject.com/ticket/28864>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 29, 2017, 8:41:16 PM11/29/17
to django-...@googlegroups.com
#28864: Allow overriding the default dropdown list for the time widget in Django
admin
-----------------------------------+--------------------------------------

Reporter: jeffrey k eliasen | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------

Comment (by Tim Graham):

Duplicate of #25006?

--
Ticket URL: <https://code.djangoproject.com/ticket/28864#comment:1>

Django

unread,
Nov 29, 2017, 10:09:49 PM11/29/17
to django-...@googlegroups.com
#28864: Allow overriding the default dropdown list for the time widget in Django
admin
-----------------------------------+--------------------------------------

Reporter: jeffrey k eliasen | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: duplicate

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by jeffrey k eliasen):

* status: new => closed
* resolution: => duplicate


Comment:

Ah yes, so it is. Thanks for pointing that out @Tim.

--
Ticket URL: <https://code.djangoproject.com/ticket/28864#comment:2>

Reply all
Reply to author
Forward
0 new messages