﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
7129	Prepend of admin_media is not working on JS	Anderson Santos	nobody	"When declaring an admin class when I declare in the inner class Media the js list of scripts with relative url, it should prepend the admin_media url but it is not working for me:

eg:


{{{
class MyClass(admin.ModelAdmin):
    list_filter = ('created','published_date','section','journalist')
    search_fields = ('headline','story')
    
    class Media:
        js = ['/mymedia/js/MyScript.js',
              'js/getElementsBySelector.js'] #it should be relative to media, but it has default media instead
}}}

This is what documentation says about JS section

""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""
"		closed	contrib.admin	newforms-admin		fixed	nfa-blocker		Unreviewed	0	0	0	0	0	0
