#9576 closed Uncategorized (wontfix)
django.contrib.admin.widgets.AdminDateWidget.Media.js missing core.js
Reported by: | eddymul | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Steps To Reproduce:
from django.contrib import admin w = admin.widgets.AdminDateWidget() w.media.render_js()
Expected:
got js/core.js:
[u'<script type="text/javascript" src="/media/js/core.js"></script>', u'<script type="text/javascript" src="/media/js/calendar.js"></script>', u'<script type="text/javascript" src="/media/js/admin/DateTimeShortcuts.js"></script>']
Observed:
missing js/core.js:
[u'<script type="text/javascript" src="/media/js/calendar.js"></script>', u'<script type="text/javascript" src="/media/js/admin/DateTimeShortcuts.js"></script>']
Notes:
I tried
class MyForm(forms.Form): class Media: js = (settings.ADMIN_MEDIA_PREFIX + 'js/core.js',)
but it doesn't work because core.js is rendered last, but AdminDateWidget.media.js assumes that core.js has been evaluated.
Attachments (1)
Change History (6)
by , 16 years ago
Attachment: | widgets.diff added |
---|
comment:1 by , 16 years ago
Has patch: | set |
---|
comment:2 by , 16 years ago
milestone: | → 1.1 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 16 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
core.js
gets included by ModelAdmin._media()
(see django/contrib/admin/options.py
around line 253).
Note:
See TracTickets
for help on using tickets.
add core.js to admin date/time widgets