File tree Expand file tree Collapse file tree 7 files changed +34
-6
lines changed Expand file tree Collapse file tree 7 files changed +34
-6
lines changed Original file line number Diff line number Diff line change 1
1
{% extends "admin/base_site.html" %}
2
2
3
+ {% load admin_static %}
4
+
3
5
{% block extrastyle %}
4
6
{{ block.super }}
5
7
< style >
9
11
width : 80% ;
10
12
}
11
13
</ style >
12
- < link href ="{{ STATIC_URL }} admin/css/forms.css " type ="text/css " rel ="stylesheet ">
14
+ < link href ="{% static ' admin/css/forms.css' %} " type ="text/css " rel ="stylesheet ">
13
15
{% endblock %}
14
16
15
17
{% block breadcrumbs %}
Original file line number Diff line number Diff line change 1
1
{% extends "admin/base_site.html" %}
2
2
3
+ {% load admin_static %}
4
+
3
5
{% block extrastyle %}
4
6
{{ block.super }}
5
7
< style >
9
11
width : 80% ;
10
12
}
11
13
</ style >
12
- < link href ="{{ STATIC_URL }} admin/css/forms.css " type ="text/css " rel ="stylesheet ">
14
+ < link href ="{% static ' admin/css/forms.css' %} " type ="text/css " rel ="stylesheet ">
13
15
{% endblock %}
14
16
15
17
{% block breadcrumbs %}
Original file line number Diff line number Diff line change 1
1
{% extends "admin/base_site.html" %}
2
2
3
+ {% load admin_static %}
4
+
3
5
{% block extrastyle %}
4
6
{{ block.super }}
5
7
< style >
9
11
width : 80% ;
10
12
}
11
13
</ style >
12
- < link href ="{{ STATIC_URL }} admin/css/forms.css " type ="text/css " rel ="stylesheet ">
14
+ < link href ="{% static ' admin/css/forms.css' %} " type ="text/css " rel ="stylesheet ">
13
15
{% endblock %}
14
16
15
17
{% block breadcrumbs %}
Original file line number Diff line number Diff line change 1
1
{% extends "admin/base_site.html" %}
2
2
3
+ {% load admin_static %}
4
+
3
5
{% block extrastyle %}
4
6
{{ block.super }}
5
7
< style >
11
13
padding-top : 3px ;
12
14
}
13
15
</ style >
14
- < link href ="{{ STATIC_URL }} admin/css/forms.css " type ="text/css " rel ="stylesheet ">
16
+ < link href ="{% static ' admin/css/forms.css' %} " type ="text/css " rel ="stylesheet ">
15
17
{% endblock %}
16
18
17
19
{% block breadcrumbs %}
Original file line number Diff line number Diff line change 1
1
{% extends "admin/base_site.html" %}
2
2
3
- {% load admin_static %}
3
+ {% load admin_static jquery_path %}
4
4
5
5
{% block extrastyle %}
6
6
{{ block.super }}
9
9
10
10
{% block extrahead %}
11
11
{{ block.super }}
12
- < script type ="text/javascript " src ="{% static " admin /js/jquery.js" %}"> </ script >
12
+ < script type ="text/javascript " src ="{% get_jquery_path as jquery_path %}{% static jquery_path %} "> </ script >
13
13
< script type ="text/javascript " src ="{% static "admin /js/jquery.init.js" %}"> </ script >
14
14
< script type ="text/javascript " src ="{% static "admin /js/actions.js" %}"> </ script >
15
15
< script type ="text/javascript ">
Original file line number Diff line number Diff line change
1
+ from distutils .version import LooseVersion
2
+ from django import template
3
+ from django .utils .version import get_version
4
+
5
+
6
+ register = template .Library ()
7
+
8
+ if LooseVersion (get_version ()) >= LooseVersion ('1.9' ):
9
+ JQUERY_PATH = 'admin/js/vendor/jquery/jquery.js'
10
+
11
+ # `assignment_tag` is deprecated as of 1.9, `simple_tag` should be used
12
+ tag_decorator = register .simple_tag
13
+ else :
14
+ JQUERY_PATH = 'admin/js/jquery.js'
15
+ tag_decorator = register .assignment_tag
16
+
17
+
18
+ @register .assignment_tag
19
+ def get_jquery_path ():
20
+ return JQUERY_PATH
You can’t perform that action at this time.
0 commit comments