#35644: `AdminDateWidget` and `AdminTimeWidget` do not have `admin/js/core.js` 
in
their `Media`
-------------------------------------+-------------------------------------
     Reporter:  MichaƂ Pokusa        |                     Type:
                                     |  Uncategorized
       Status:  new                  |                Component:  Forms
      Version:  5.0                  |                 Severity:  Normal
     Keywords:  media, widgets,      |             Triage Stage:
  admin                              |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 While developing an extension for Django I noticed that both
 `AdminDateWidget` and `AdminTimeWidget` do not have `admin/js/core.js` in
 their `Media` nor do they inherit it from any parent class.

 The `admin/js/core.js`, specifically the `quickElement` function is used
 inside `admin/js/admin/DateTimeShortcuts.js`, which they both reference.

 Usually, this is not an issue as `admin/js/core.js` is referenced in
 `ModelAdmin.media`, **but nevertheless this seems like it was missed
 rather than an intended way**. Other admin widget -
 `FilteredSelectMultiple` - references `admin/js/core.js` together with
 other scripts needed for it to work.

 Wraping it up, I suggest adding `admin/js/core.js` to both
 `AdminDateWidget` and `AdminTimeWidget` to unify them with
 `FilteredSelectMultiple`.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35644>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070191063d465d-51092ca2-36db-4a2a-a6e4-5ca912488b3e-000000%40eu-central-1.amazonses.com.

Reply via email to