From 63a34af81cdfe76286c4e53bb0a070fa6f4f0645 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 10 Apr 2013 20:37:27 +0100 Subject: [PATCH] Load time improvements * Use gzip middleware * Reorganize JS loading to the end of the page. --- app/vapemap/conf/base.py | 2 ++ app/vapemap/templates/base.html | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/vapemap/conf/base.py b/app/vapemap/conf/base.py index f845e1b..584f0a0 100644 --- a/app/vapemap/conf/base.py +++ b/app/vapemap/conf/base.py @@ -82,6 +82,8 @@ INSTALLED_APPS = [ ] MIDDLEWARE_CLASSES = [ + 'django.middleware.http.ConditionalGetMiddleware', + 'django.middleware.gzip.GZipMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', diff --git a/app/vapemap/templates/base.html b/app/vapemap/templates/base.html index 4b9e423..f5ddceb 100644 --- a/app/vapemap/templates/base.html +++ b/app/vapemap/templates/base.html @@ -14,18 +14,12 @@ + {% block style %} + {% endblock %} - - - {% include "ga.html" %} - {% block style %} - {% endblock %} @@ -80,6 +74,12 @@ {% include "login_form.html" %} {% endif %} + + +{% include "ga.html" %} {% block scripts %} {% endblock %}