Ticket #1099: admin.diff

File admin.diff, 925 bytes (added by Nebojša Đorđević - nesh <nesh@…>, 10 years ago)
  • store/django/django/contrib/admin/templatetags/admin_modify.py

     
    1717
    1818#@register.simple_tag
    1919def include_admin_script(script_path):
    20     return '<script type="text/javascript" src="%s%s"></script>' % (ADMIN_MEDIA_PREFIX, script_path)
     20    if script_path.startswith('/'):
     21        # absolute path requested, ignore ADMIN_MEDIA_PREFIX
     22        return '<script type="text/javascript" src="%s"></script>' % script_path
     23    else:
     24        return '<script type="text/javascript" src="%s%s"></script>' % (ADMIN_MEDIA_PREFIX, script_path)
    2125include_admin_script = register.simple_tag(include_admin_script)
    2226
    2327#@register.inclusion_tag('admin/submit_line', takes_context=True)
Back to Top