Commit b9d17146 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Add django compressor

parent 32edc69d
......@@ -2,6 +2,7 @@ Django==1.10
django-localflavor==1.3
Pillow
django-static-precompiler>=1.4,<2
django-compressor==2.1
django-sendfile==0.3.10
django-template-check>=0.3.0 # This should be in dev-requirements somehow
bleach==1.4.3
......
......@@ -47,6 +47,7 @@ INSTALLED_APPS = [
'tinymce',
'django_template_check', # This is only necessary in development
'rest_framework',
'compressor',
# Our apps
'thaliawebsite', # include for admin settings
'members',
......@@ -173,7 +174,11 @@ STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# other finders
'static_precompiler.finders.StaticPrecompilerFinder',
'compressor.finders.CompressorFinder',
)
# Compressor settings
COMPRESS_ENABLED = True
# Precompiler settings
STATIC_PRECOMPILER_LIST_FILES = True
{% load i18n static compile_static menu %}
{% load i18n static compile_static menu compress %}
{% get_current_language as LANGUAGE_CODE %}
<!DOCTYPE html>
<!--[if IE 9]><html dir="ltr" lang="{{ LANGUAGE_CODE }}" class="lt-ie10"> <![endif]-->
......@@ -17,6 +17,7 @@
<!-- css stylesheets -->
{% block css_head %}
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,400,700" rel="stylesheet" type="text/css">
{% compress css %}
<link href="{% static "fonts/gillsans.css" %}" rel="stylesheet" type="text/css">
<link href="{% static "plugins/font-awesome/css/font-awesome.min.css" %}" rel="stylesheet" type="text/css">
......@@ -26,16 +27,16 @@
<link href="{% static "css/style.less"|compile %}" rel="stylesheet" type="text/css">
<link href="{% static "css/skin.less"|compile %}" rel="stylesheet" type="text/css">
{% endblock %}
{% endcompress %}{% endblock %}
<!-- js head -->
{% block js_head %}
{% block js_head %}{% compress js %}
<script type="text/javascript" src="{% static "plugins/jquery-1.8.3.min.js" %}"></script>
<script type="text/javascript" src="{% static "js/jquery.jscroll.min.js" %}"></script>
<script type="text/javascript" src="{% static "js/jquery.fancybox.js" %}"></script>
<script type="text/javascript" src="{% static "js/thimbus.js" %}"></script>
<script type="text/javascript" src="{% static "js/scripts.js" %}"></script>
{% endblock %}
{% endcompress %}{% endblock %}
</head>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment