Ticket #2869: admin_js_httpprefix.diff

File admin_js_httpprefix.diff, 735 bytes (added by oyvind@…, 18 years ago)

Patch

  • django/contrib/admin/templatetags/admin_modify.py

     
    2929        <script type="text/javascript" src="/media/admin/js/calendar.js">
    3030    """
    3131
    32     return '<script type="text/javascript" src="%s%s"></script>' % (settings.ADMIN_MEDIA_PREFIX, script_path)
     32    return '<script type="text/javascript" src="%s%s"></script>' % (
     33        not script_path.startswith('http://') and settings.ADMIN_MEDIA_PREFIX or '', script_path)
    3334include_admin_script = register.simple_tag(include_admin_script)
    3435
    3536def submit_row(context):
Back to Top