mirror of
https://github.com/nikdoof/vapemap.git
synced 2025-12-14 14:52:16 +00:00
Load time improvements
* Use gzip middleware * Reorganize JS loading to the end of the page.
This commit is contained in:
@@ -82,6 +82,8 @@ INSTALLED_APPS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = [
|
MIDDLEWARE_CLASSES = [
|
||||||
|
'django.middleware.http.ConditionalGetMiddleware',
|
||||||
|
'django.middleware.gzip.GZipMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
|
|||||||
@@ -14,18 +14,12 @@
|
|||||||
<link href="{% static "css/bootstrap.min.css" %}" rel="stylesheet">
|
<link href="{% static "css/bootstrap.min.css" %}" rel="stylesheet">
|
||||||
<link href="{% static "css/bootstrap-responsive.min.css" %}" rel="stylesheet">
|
<link href="{% static "css/bootstrap-responsive.min.css" %}" rel="stylesheet">
|
||||||
<link href="{% static "css/base.css" %}" rel="stylesheet">
|
<link href="{% static "css/base.css" %}" rel="stylesheet">
|
||||||
|
{% block style %}
|
||||||
|
{% endblock %}
|
||||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="{% static "js/html5shiv.js" %}"></script>
|
<script src="{% static "js/html5shiv.js" %}"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
var static_url = '{{ STATIC_URL }}';
|
|
||||||
var django = {'jQuery': $};
|
|
||||||
</script>
|
|
||||||
{% include "ga.html" %}
|
|
||||||
{% block style %}
|
|
||||||
{% endblock %}
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -80,6 +74,12 @@
|
|||||||
{% include "login_form.html" %}
|
{% include "login_form.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var static_url = '{{ STATIC_URL }}';
|
||||||
|
var django = {'jQuery': $};
|
||||||
|
</script>
|
||||||
|
{% include "ga.html" %}
|
||||||
<script src="{% static "js/bootstrap.min.js" %}"></script>
|
<script src="{% static "js/bootstrap.min.js" %}"></script>
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user