Opened 18 years ago

Closed 17 years ago

#4398 closed (fixed)

[newforms-admin] js variable in models.Admin class

Reported by: Baptiste <baptiste.goupil@…> Owned by: Adrian Holovaty
Component: contrib.admin Version: newforms-admin
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description (last modified by Adrian Holovaty)

In the admin class, if you do :

js = ['http://127.0.0.1:8000/mediafiles/admin.js']

It will be rendered like that in the admin :

<script src="/media/http://127.0.0.1:8000/mediafiles/admin.js" type="text/javascript"/>

Doc says : « If you use relative URLs — URLs that don’t start with http:// or / — then the admin site will automatically prefix these links with settings.ADMIN_MEDIA_PREFIX. », so I guess this is a bug.

Attachments (1)

4398_newforms_admin_js_path_fix.diff (848 bytes ) - added by Brian Rosner <brosner@…> 17 years ago.
patch to fix #4398

Download all attachments as: .zip

Change History (8)

comment:1 by Adrian Holovaty, 17 years ago

Description: modified (diff)

(Fixed formatting in description.)

comment:2 by Adrian Holovaty, 17 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Adrian Holovaty, 17 years ago

Version: newforms branchnewforms-admin

by Brian Rosner <brosner@…>, 17 years ago

patch to fix #4398

comment:4 by Brian Rosner <brosner@…>, 17 years ago

Has patch: set

comment:5 by andy@…, 17 years ago

This incorrectly reverses the order of the the js files. I think changing line 224 to:
js_urls.insert(0,'%s%s' % (prefix, url))
will fix that.

comment:6 by andy@…, 17 years ago

Patch needs improvement: set

comment:7 by Russell Keith-Magee, 17 years ago

Resolution: fixed
Status: newclosed

This issue has been resolved through the introduction of the media framework, introduced in [5926]

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