Opened 9 years ago

Closed 9 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: UI/UX:

Description (last modified by Adrian Holovaty)

In the admin class, if you do :

js = ['']

It will be rendered like that in the admin :

<script src="/media/" 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@…> 9 years ago.
patch to fix #4398

Download all attachments as: .zip

Change History (8)

comment:1 Changed 9 years ago by Adrian Holovaty

Description: modified (diff)
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

(Fixed formatting in description.)

comment:2 Changed 9 years ago by Adrian Holovaty

Triage Stage: UnreviewedAccepted

comment:3 Changed 9 years ago by Adrian Holovaty

Version: newforms branchnewforms-admin

Changed 9 years ago by Brian Rosner <brosner@…>

patch to fix #4398

comment:4 Changed 9 years ago by Brian Rosner <brosner@…>

Has patch: set

comment:5 Changed 9 years ago by andy@…

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 Changed 9 years ago by andy@…

Patch needs improvement: set

comment:7 Changed 9 years ago by Russell Keith-Magee

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