--- a/src/jocondelab/config.py.tmpl Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/config.py.tmpl Sun Feb 02 01:19:23 2014 +0100
@@ -78,6 +78,8 @@
# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = BASE_STATIC_URL + 'site/'
+STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
+
# Make this unique, and don't share it with anybody.
SECRET_KEY = '%(secret_key)s'
@@ -155,3 +157,8 @@
CACHE_MIDDLEWARE_SECONDS = 600
HOME_CACHE_SECONDS = 30
+
+#PIPELINE_ENABLED = not DEBUG
+PIPELINE_CSS_COMPRESSOR = "pipeline.compressors.yuglify.YuglifyCompressor"
+PIPELINE_JS_COMPRESSOR = "pipeline.compressors.yuglify.YuglifyCompressor"
+
--- a/src/jocondelab/settings.py Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/settings.py Sun Feb 02 01:19:23 2014 +0100
@@ -103,6 +103,8 @@
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
+STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
+
# Make this unique, and don't share it with anybody.
SECRET_KEY = ''
@@ -169,6 +171,7 @@
'django.contrib.admin',
'south',
'mptt',
+ 'pipeline',
'core',
'jocondelab',
)
@@ -273,6 +276,138 @@
CACHE_MIDDLEWARE_SECONDS = 600
HOME_CACHE_SECONDS = 30
+BASE_CSS = ('jocondelab/css/smoothness/jquery-ui-1.10.3.custom.min.css', 'jocondelab/lib/jquery.tagit.css', 'jocondelab/css/front-common.css')
+
+PIPELINE_CSS = {
+ 'front-base': {
+ 'source_filenames': BASE_CSS,
+ 'output_filename': 'jocondelab/css/front-base.min.css',
+ },
+ 'front-credits': {
+ 'source_filenames': BASE_CSS + (
+ 'jocondelab/css/front-credits.css',
+ ),
+ 'output_filename': 'jocondelab/css/front-credit.min.css',
+ },
+ 'front-timeline': {
+ 'source_filenames': BASE_CSS + (
+ 'jocondelab/css/front-timeline.css',
+ ),
+ 'output_filename': 'jocondelab/css/front-timeline.min.css',
+ },
+ 'front-termlist': {
+ 'source_filenames': BASE_CSS + (
+ 'jocondelab/css/front-termlist.css',
+ ),
+ 'output_filename': 'jocondelab/css/front-termlist.min.css',
+ },
+ 'front-notice': {
+ 'source_filenames': BASE_CSS + (
+ 'jocondelab/lib/magnific-popup.css',
+ 'jocondelab/css/front-notice.css'
+ ),
+ 'output_filename': 'jocondelab/css/front-notice.min.css',
+ },
+ 'front-geo': {
+ 'source_filenames': BASE_CSS + (
+ 'jocondelab/lib/leaflet.css',
+ 'jocondelab/lib/L.Control.Zoomslider.css',
+ 'jocondelab/css/front-geo.css',
+ ),
+ 'output_filename': 'jocondelab/css/front-geo.min.css',
+ },
+ 'front-home': {
+ 'source_filenames': BASE_CSS + (
+ 'jocondelab/css/front-home.css',
+ ),
+ 'output_filename': 'jocondelab/css/front-home.min.css',
+ },
+ 'front-students': {
+ 'source_filenames': BASE_CSS + (
+ 'jocondelab/css/front-students.css',
+ ),
+ 'output_filename': 'jocondelab/css/front-students.min.css',
+ },
+ 'front-students-group': {
+ 'source_filenames': BASE_CSS + (
+ 'jocondelab/css/front-students.css',
+ ),
+ 'output_filename': 'jocondelab/css/front-students-group.min.css',
+ },
+}
+
+
+BASE_JS = (
+ 'jocondelab/lib/underscore-min.js',
+ 'jocondelab/lib/jquery.min.js' ,
+ 'jocondelab/lib/jquery-ui.min.js',
+ 'jocondelab/lib/jquery.ui.touch-punch.min.js',
+ 'jocondelab/lib/tag-it.min.js',
+ 'jocondelab/js/front-common.js',
+)
+BASE_JS_SEARCH = BASE_JS + (
+ 'jocondelab/js/front-search.js',
+)
+
+PIPELINE_JS = {
+ 'front-geo': {
+ 'source_filenames': BASE_JS + (
+ 'jocondelab/lib/leaflet.js',
+ 'jocondelab/lib/L.Control.Zoomslider.js',
+ 'jocondelab/lib/oms.min.js',
+ 'jocondelab/js/front-geo.js',
+ ),
+ 'output_filename': 'jocondelab/js/front-geo.min.js',
+ },
+ 'front-home': {
+ 'source_filenames': BASE_JS_SEARCH + (
+ 'jocondelab/js/front-home.js',
+ ),
+ 'output_filename': 'jocondelab/js/front-home.min.js',
+ },
+ 'front-notice': {
+ 'source_filenames': BASE_JS + (
+ 'jocondelab/lib/jquery.magnific-popup.min.js',
+ 'jocondelab/js/front-notice.js',
+ ),
+ 'output_filename': 'jocondelab/js/front-notice.min.js',
+ },
+ 'front-search': {
+ 'source_filenames': BASE_JS_SEARCH,
+ 'output_filename': 'jocondelab/js/front-search.min.js',
+ },
+ 'front-students-group': {
+ 'source_filenames': BASE_JS + (
+ 'jocondelab/lib/videojs/video.js',
+ ),
+ 'output_filename': 'jocondelab/js/front-students-group.min.js',
+ },
+ 'front-students': {
+ 'source_filenames': BASE_JS + (
+ 'jocondelab/lib/videojs/video.js',
+ ),
+ 'output_filename': 'jocondelab/js/front-students.min.js',
+ },
+ 'front-termlist': {
+ 'source_filenames': BASE_JS + (
+ 'jocondelab/js/front-termlist.js',
+ ),
+ 'output_filename': 'jocondelab/js/front-termlist.min.js',
+ },
+ 'front-timeline': {
+ 'source_filenames': BASE_JS + (
+ 'jocondelab/lib/jquery.mousewheel.js',
+ 'jocondelab/lib/hammer.min.js',
+ 'jocondelab/js/front-timeline.js',
+ ),
+ 'output_filename': 'jocondelab/js/front-timeline.min.js',
+ },
+}
+
+PIPELINE_CSS_COMPRESSOR = "pipeline.compressors.yuglify.YuglifyCompressor"
+PIPELINE_JS_COMPRESSOR = "pipeline.compressors.yuglify.YuglifyCompressor"
+
+
from config import * # @UnusedWildImport
if not "SRC_BASE_URL" in locals():
--- a/src/jocondelab/static/jocondelab/js/front-common.js Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/static/jocondelab/js/front-common.js Sun Feb 02 01:19:23 2014 +0100
@@ -479,7 +479,6 @@
};
window.loadSearchResults = function(query) {
- console.log('window.loadSearchResults');
$(".hide-on-search").hide();
$win.off("scroll.ajaxload");
$(".wiki-info img").off("load error");
--- a/src/jocondelab/templates/jocondelab/front_base.html Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/templates/jocondelab/front_base.html Sun Feb 02 01:19:23 2014 +0100
@@ -1,5 +1,7 @@
{% load i18n %}
{% load static %}
+{% load compressed %}
+
<!doctype html>
{% get_language_info for LANGUAGE_CODE as current_lang %}
<html lang="{{LANGUAGE_CODE}}"{% if current_lang.bidi %} dir="rtl"{% endif %}>
@@ -9,26 +11,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="SHORTCUT ICON" href="{% static 'jocondelab/img/favicon.ico' %}" />
<title>{% block title %}JocondeLab{% endblock %}</title>
-
- {% block js_import %}
- <script type="text/javascript" src="{% url 'i18n_javascript_catalog' %}"></script>
- <script type="text/javascript" src="{% static 'jocondelab/lib/underscore-min.js' %}"></script>
- <script type="text/javascript" src="{% static 'jocondelab/lib/jquery.min.js' %}"></script>
- <script type="text/javascript" src="{% static 'jocondelab/lib/jquery-ui.min.js' %}"></script>
- <script type="text/javascript" src="{% static 'jocondelab/lib/jquery.ui.touch-punch.min.js' %}"></script>
- <script type="text/javascript" src="{% static 'jocondelab/lib/tag-it.min.js' %}"></script>
- {% endblock %}
-
+
{% block css_import %}
- <link rel="stylesheet" href="{% static 'jocondelab/css/smoothness/jquery-ui-1.10.3.custom.min.css' %}" type="text/css"/>
- <link rel="stylesheet" href="{% static 'jocondelab/lib/jquery.tagit.css' %}" type="text/css"/>
- {% endblock %}
-
- {% block css_declaration %}
- <link rel="stylesheet" href="{% static 'jocondelab/css/front-common.css' %}" type="text/css"/>
+ {% compressed_css 'front-base' %}
{% endblock %}
{% block js_declaration %}
+ <script type="text/javascript" src="{% url 'i18n_javascript_catalog' %}"></script>
<script type="text/javascript">
var urls = {
ajax_terms: "{% url 'ajax_terms' %}",
@@ -36,7 +25,11 @@
img_if_404: "{% static 'jocondelab/img/default-image.png' %}"
};
</script>
- <script type="text/javascript" src="{% static 'jocondelab/js/front-common.js' %}"></script>
+ {% endblock %}
+ {% block js_import %}
+ {% endblock %}
+
+ {% block css_declaration %}
{% endblock %}
{% endblock %}
--- a/src/jocondelab/templates/jocondelab/front_credits.html Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/templates/jocondelab/front_credits.html Sun Feb 02 01:19:23 2014 +0100
@@ -1,10 +1,14 @@
{% extends "jocondelab/front_base.html" %}
{% load i18n %}
{% load static %}
+{% load compressed %}
-{% block css_declaration %}
- {{block.super}}
- <link rel="stylesheet" type="text/css" href="{% static 'jocondelab/css/front-credits.css' %}" />
+
+{% block css_import %}
+ {% compressed_css 'front-credits' %}
+{% endblock %}
+
+{% block js_declaration %}
{% endblock %}
{% block title %}JocondeLab » {% trans 'Crédits' %}{% endblock %}
--- a/src/jocondelab/templates/jocondelab/front_geo.html Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/templates/jocondelab/front_geo.html Sun Feb 02 01:19:23 2014 +0100
@@ -1,18 +1,14 @@
{% extends "jocondelab/front_base.html" %}
{% load i18n %}
{% load static %}
+{% load compressed %}
{% block js_import %}
- {{block.super}}
- <script type="text/javascript" src="{% static 'jocondelab/lib/leaflet.js' %}"></script>
- <script type="text/javascript" src="{% static 'jocondelab/lib/L.Control.Zoomslider.js' %}"></script>
- <script type="text/javascript" src="{% static 'jocondelab/lib/oms.min.js' %}"></script>
+ {% compressed_js 'front-geo' %}
{% endblock %}
{% block css_import %}
- {{block.super}}
- <link rel="stylesheet" type="text/css" href="{% static 'jocondelab/lib/leaflet.css' %}" />
- <link rel="stylesheet" type="text/css" href="{% static 'jocondelab/lib/L.Control.Zoomslider.css' %}" />
+ {% compressed_css 'front-geo' %}
{% endblock %}
{% block js_declaration %}
@@ -25,13 +21,8 @@
urls.countries_geo_json = "{% static 'jocondelab/lib/countries.geo.json' %}";
var countries = {{countries|safe}};
</script>
- <script type="text/javascript" src="{% static 'jocondelab/js/front-geo.js' %}"></script>
{% endblock %}
-{% block css_declaration %}
- {{block.super}}
- <link rel="stylesheet" type="text/css" href="{% static 'jocondelab/css/front-geo.css' %}"></script>
-{% endblock %}
{% block title %}JocondeLab » {% trans 'Mappemonde' %}{% endblock %}
--- a/src/jocondelab/templates/jocondelab/front_home.html Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/templates/jocondelab/front_home.html Sun Feb 02 01:19:23 2014 +0100
@@ -1,15 +1,14 @@
{% extends "jocondelab/front_search.html" %}
{% load i18n %}
+{% load compressed %}
{% load static %}
-{% block js_declaration %}
-{{block.super}}
- <script type="text/javascript" src="{% static 'jocondelab/js/front-home.js' %}"></script>
+{% block js_import %}
+ {% compressed_js 'front-home' %}
{% endblock %}
-{% block css_declaration %}
-{{block.super}}
- <link rel="stylesheet" type="text/css" href="{% static 'jocondelab/css/front-home.css' %}" />
+{% block css_import %}
+ {% compressed_css 'front-home' %}
{% endblock %}
{% block title %}JocondeLab » {% trans 'Accueil' %}{% endblock %}
--- a/src/jocondelab/templates/jocondelab/front_legal.html Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/templates/jocondelab/front_legal.html Sun Feb 02 01:19:23 2014 +0100
@@ -5,6 +5,8 @@
{% block breadcrumbs %}{% trans 'Mentions légales' %}{% endblock %}
+{% block js_declaration %}{% endblock %}
+
{% block main %}
<div class="about-text">
<h1>Mentions légales JocondeLab</h1>
--- a/src/jocondelab/templates/jocondelab/front_notice.html Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/templates/jocondelab/front_notice.html Sun Feb 02 01:19:23 2014 +0100
@@ -2,10 +2,10 @@
{% load i18n %}
{% load jlutils %}
{% load static %}
+{% load compressed %}
{% block js_import %}
- {{block.super}}
- <script type="text/javascript" src="{% static 'jocondelab/lib/jquery.magnific-popup.min.js' %}"></script>
+ {% compressed_js 'front-notice' %}
{% endblock %}
{% block js_declaration %}
@@ -18,18 +18,12 @@
urls.downvote = "{% url 'ajax_downvote' %}";
urls.wikipedia = {{wikipedia_urls|safe}};
</script>
- <script type="text/javascript" src="{% static 'jocondelab/js/front-notice.js' %}"></script>
{% endblock %}
{% block css_import %}
- {{block.super}}
- <link rel="stylesheet" href="{% static 'jocondelab/lib/magnific-popup.css' %}" type="text/css" />
+ {% compressed_css 'front-notice' %}
{% endblock %}
-{% block css_declaration %}
- {{block.super}}
- <link rel="stylesheet" href="{% static 'jocondelab/css/front-notice.css' %}" type="text/css" />
-{% endblock %}
{% block title %}JocondeLab » {% trans "Détail d'une notice" %}{% endblock %}
--- a/src/jocondelab/templates/jocondelab/front_search.html Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/templates/jocondelab/front_search.html Sun Feb 02 01:19:23 2014 +0100
@@ -1,6 +1,7 @@
{% extends "jocondelab/front_base.html" %}
{% load i18n %}
{% load static %}
+{% load compressed %}
{% block js_declaration %}
{{block.super}}
@@ -8,7 +9,10 @@
var queryobj = {% if queryobj %}{{queryobj|safe}}{% else %}null{% endif %},
uri_cache = {% if uri_cache %}{{uri_cache|safe}}{% else %}{}{% endif %};
</script>
- <script type="text/javascript" src="{% static 'jocondelab/js/front-search.js' %}"></script>
+{% endblock %}
+
+{% block js_import %}
+ {% compressed_js 'front-search' %}
{% endblock %}
{% block title %}JocondeLab » {% if searchterms_label %}{% blocktrans %}Résultats pour : « {{searchterms_label}} »{% endblocktrans %}{% else %}{% trans 'Recherche' %}{% endif %}{% endblock %}
--- a/src/jocondelab/templates/jocondelab/front_students.html Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/templates/jocondelab/front_students.html Sun Feb 02 01:19:23 2014 +0100
@@ -1,17 +1,16 @@
{% extends "jocondelab/front_base.html" %}
{% load i18n %}
{% load static %}
+{% load compressed %}
-{% block css_declaration %}
- {{block.super}}
- <link rel="stylesheet" type="text/css" href="{% static 'jocondelab/css/front-students.css' %}" />
+{% block css_import %}
+ {% compressed_css 'front-students' %}
{% endblock %}
{% block title %}JocondeLab » {% trans "Galerie de créations" %}{% endblock %}
-{% block breadcrumbs %}{% trans "Galerie de créations" %}{% endblock %}
-
{% block js_declaration %}
+ {% compressed_js 'front-students' %}
{{block.super}}
<script type="text/javascript">
$(function() {
@@ -19,6 +18,10 @@
});
</script>
{% endblock %}
+{% block js_import %}
+{% endblock %}
+
+{% block breadcrumbs %}{% trans "Galerie de créations" %}{% endblock %}
{% block main %}
<div class="results">
--- a/src/jocondelab/templates/jocondelab/front_students_group.html Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/templates/jocondelab/front_students_group.html Sun Feb 02 01:19:23 2014 +0100
@@ -1,15 +1,14 @@
{% extends "jocondelab/front_base.html" %}
{% load i18n %}
{% load static %}
+{% load compressed %}
{% block js_import %}
- {{block.super}}
- <script type="text/javascript" src="{% static 'jocondelab/lib/videojs/video.js' %}"></script>
{% endblock %}
+
{% block css_import %}
- {{block.super}}
- <link rel="stylesheet" type="text/css" href="{% static 'jocondelab/css/front-students.css' %}" />
+ {% compressed_css 'front-students-group' %}
<link rel="stylesheet" type="text/css" href="{% static 'jocondelab/lib/videojs/video-js.min.css' %}" />
{% endblock %}
@@ -18,6 +17,7 @@
{% block breadcrumbs %}{% trans "Galerie de créations" %}{% endblock %}
{% block js_declaration %}
+ {% compressed_js 'front-students-group' %}
{{block.super}}
<script type="text/javascript">
--- a/src/jocondelab/templates/jocondelab/front_termlist.html Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/templates/jocondelab/front_termlist.html Sun Feb 02 01:19:23 2014 +0100
@@ -1,15 +1,14 @@
{% extends "jocondelab/front_base.html" %}
{% load i18n %}
{% load static %}
+{% load compressed %}
-{% block js_declaration %}
- {{block.super}}
- <script type="text/javascript" src="{% static 'jocondelab/js/front-termlist.js' %}"></script>
+{% block js_import %}
+ {% compressed_js 'front-termlist' %}
{% endblock %}
-{% block css_declaration %}
- {{block.super}}
- <link rel="stylesheet" type="text/css" href="{% static 'jocondelab/css/front-termlist.css' %}" />
+{% block css_import %}
+ {% compressed_css 'front-termlist' %}
{% endblock %}
{% block title %}JocondeLab » {% trans 'Mots-clés' %}{% endblock %}
--- a/src/jocondelab/templates/jocondelab/front_timeline.html Thu Jan 30 17:09:23 2014 +0100
+++ b/src/jocondelab/templates/jocondelab/front_timeline.html Sun Feb 02 01:19:23 2014 +0100
@@ -1,11 +1,10 @@
{% extends "jocondelab/front_base.html" %}
{% load i18n %}
{% load static %}
+{% load compressed %}
{% block js_import %}
- {{block.super}}
- <script type="text/javascript" src="{% static 'jocondelab/lib/jquery.mousewheel.js' %}"></script>
- <script type="text/javascript" src="{% static 'jocondelab/lib/hammer.min.js' %}"></script>
+ {% compressed_js 'front-timeline' %}
{% endblock %}
{% block js_declaration %}
@@ -13,12 +12,10 @@
<script type="text/javascript">
urls.ajax_years = "{% url 'ajax_years' %}";
</script>
- <script type="text/javascript" src="{% static 'jocondelab/js/front-timeline.js' %}"></script>
{% endblock %}
-{% block css_declaration %}
- {{block.super}}
- <link rel="stylesheet" type="text/css" href="{% static 'jocondelab/css/front-timeline.css' %}" />
+{% block css_import %}
+ {% compressed_css 'front-timeline' %}
{% endblock %}
{% block title %}JocondeLab » {% trans 'Chronologie' %}{% endblock %}
--- a/virtualenv/res/lib/lib_create_env.py Thu Jan 30 17:09:23 2014 +0100
+++ b/virtualenv/res/lib/lib_create_env.py Sun Feb 02 01:19:23 2014 +0100
@@ -37,6 +37,7 @@
'HTML5LIB': {'setup': 'html5lib','url':'https://github.com/html5lib/html5lib-python/archive/1.0b1.tar.gz', 'local': 'html5lib-1.0b1.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
'WIKITOOLS' : { 'setup': 'wikitools', 'url': 'wikitools-1.1.1.tar.bz2', 'local': 'wikitools-1.1.1.tar.bz2', 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
'MPTT' : { 'setup': 'django-mptt', 'url': 'https://codeload.github.com/django-mptt/django-mptt/tar.gz/master', 'local': 'django-mptt-0.5.-dev.tar.bz2', 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
+ 'PIPELINE' : { 'setup': 'django-pipeline', 'url': 'https://github.com/cyberdelia/django-pipeline/archive/1.3.20.tar.gz', 'local': 'django-pipeline-1.3.20.tar.gz', 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
}
if system_str == 'Windows':
Binary file virtualenv/res/src/django-pipeline-1.3.20.tar.gz has changed
--- a/virtualenv/web/res/requirement.txt Thu Jan 30 17:09:23 2014 +0100
+++ b/virtualenv/web/res/requirement.txt Sun Feb 02 01:19:23 2014 +0100
@@ -7,6 +7,7 @@
django-extensions==1.1.1
django-haystack==2.0.0
django-mptt==0.5.-dev
+django-pipeline==1.3.20
html5lib==1.0b1
isodate==0.4.9
lxml==3.2.1
--- a/virtualenv/web/res/res_create_env.py Thu Jan 30 17:09:23 2014 +0100
+++ b/virtualenv/web/res/res_create_env.py Sun Feb 02 01:19:23 2014 +0100
@@ -29,6 +29,7 @@
# 'RDFLIB-SQLALCHEMY',
# 'WIKITOOLS',
# 'MPTT',
+# 'PIPELINE',
]
if system_str == "Linux":