Opened 17 years ago
Closed 17 years ago
#4398 closed (fixed)
[newforms-admin] js variable in models.Admin class
Reported by: | 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 )
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)
Change History (8)
comment:1 by , 17 years ago
Description: | modified (diff) |
---|
comment:2 by , 17 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 17 years ago
Version: | newforms branch → newforms-admin |
---|
comment:4 by , 17 years ago
Has patch: | set |
---|
comment:5 by , 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 , 17 years ago
Patch needs improvement: | set |
---|
comment:7 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This issue has been resolved through the introduction of the media framework, introduced in [5926]
(Fixed formatting in description.)