Commit 2d04d5fd authored by alexandre's avatar alexandre

Merge branch 'feature-compress'

parents e0f267ba 82662f47
......@@ -29,6 +29,8 @@ INSTALLED_APPS = [
'rest_framework',
'django_filters',
'compressor',
'playground',
]
......@@ -96,10 +98,29 @@ USE_L10N = True
USE_TZ = True
# Django registration
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# other finders..
'compressor.finders.CompressorFinder',
)
# Django registration
ACCOUNT_ACTIVATION_DAYS = 7 # One-week activation window; you may, of course, use a different value.
# Django Compressor setup
COMPRESS_PRECOMPILERS = (
('text/css', './node_modules/.bin/postcss {infile} --use postcss-cssnext --use postcss-import'),
)
COMPRESS_ENABLED = True
COMPRESS_CSS_FILTERS = [
'compressor.filters.css_default.CssAbsoluteFilter',
'compressor.filters.cssmin.CSSMinFilter'
]
try:
LOCAL_SETTINGS
......
{% load static %}
{% load static compress %}
<!DOCTYPE HTML>
<html lang="fr">
......@@ -7,10 +7,13 @@
<title>Notation W</title>
{% compress css %}
<link rel="stylesheet" href="{% static 'playground/vendors/reset.css' %}">
<link rel="stylesheet" href="{% static 'playground/vendors/backgrid.css' %}">
<link rel="stylesheet" href="{% static 'playground/vendors/backgrid-paginator.min.css' %}">
<link rel="stylesheet" href="{% static 'playground/css/styles.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'playground/css/styles.css' %}">
{% endcompress %}
<script id="base-template" type="text/template">
{% include "playground/underscore/base.mtpl" %}
......@@ -103,6 +106,8 @@
<script src="{% static 'playground/vendors/moment-with-locales.min.js' %}"></script>
<script src="{% static 'playground/vendors/jquery-ui.min.js' %}"></script>
<script src="{% static 'playground/vendors/jquery.mjs.nestedSortable.js' %}"></script>
{% compress js %}
<script src="{% static 'playground/js/models.js' %}"></script>
<script src="{% static 'playground/js/collections.js' %}"></script>
<script src="{% static 'playground/js/views.js' %}"></script>
......@@ -110,6 +115,7 @@
<script src="{% static 'playground/js/routers.js' %}"></script>
<script src="{% static 'playground/js/apps.js' %}"></script>
<script src="{% static 'playground/js/main.js' %}"></script>
{% endcompress %}
</body>
</html>
......@@ -4,3 +4,4 @@ djangorestframework
djangorestframework-recursive
psycopg2
django-filter
django-compressor
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