Ticket #3199: include_admin_script_with_option2.patch
File include_admin_script_with_option2.patch, 756 bytes (added by , 18 years ago) |
---|
-
django/contrib/admin/templatetags/admin_modify.
old new 28 28 29 29 <script type="text/javascript" src="/media/admin/js/calendar.js"> 30 30 """ 31 32 return '<script type="text/javascript" src="%s%s"></script>' % (settings.ADMIN_MEDIA_PREFIX, script_path) 31 include_tmpl = '<script type="text/javascript" src="%s%s"></script>' 32 if script_path[0] == '/': 33 return include_tmpl % (settings.MEDIA_URL, script_path[1:]) 34 else: 35 return include_tmpl % (settings.ADMIN_MEDIA_PREFIX, script_path) 33 36 include_admin_script = register.simple_tag(include_admin_script) 34 37 35 38 def submit_row(context):