Opened 16 years ago

Closed 16 years ago

Last modified 3 months ago

#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)

widgets.diff (954 bytes ) - added by Wayne K. Werner 16 years ago.
add core.js to admin date/time widgets

Download all attachments as: .zip

Change History (6)

by Wayne K. Werner, 16 years ago

Attachment: widgets.diff added

add core.js to admin date/time widgets

comment:1 by Wayne K. Werner, 16 years ago

Has patch: set

comment:2 by Jacob, 16 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:3 by Jacob, 16 years ago

Resolution: wontfix
Status: newclosed

core.js gets included by ModelAdmin._media() (see django/contrib/admin/options.py around line 253).

comment:4 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

comment:5 by Natalia Bidart, 3 months ago

Severity: Normal
Type: Uncategorized

#35644 was a duplicate.

Note: See TracTickets for help on using tickets.
Back to Top