From c4186ff33ef916ba0ac8bcefc0714e581391994b Mon Sep 17 00:00:00 2001 From: fergalmoran Date: Tue, 11 Sep 2012 20:48:00 +0100 Subject: [PATCH 1/2] Testing commit from new remote --- dss/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dss/settings.py b/dss/settings.py index 2764170..fb5551a 100644 --- a/dss/settings.py +++ b/dss/settings.py @@ -1,4 +1,4 @@ -# Django settings for dss project. +## Django settings for dss project. from datetime import timedelta from django.core.urlresolvers import reverse_lazy import djcelery @@ -219,4 +219,4 @@ GOOGLE_ANALYTICS_CODE = localsettings.GOOGLE_ANALYTICS_CODE SENDFILE_BACKEND = localsettings.SENDFILE_BACKEND SENDFILE_ROOT = os.path.join(MEDIA_ROOT, 'mixes') -SENDFILE_URL = '/media/mixes' \ No newline at end of file +SENDFILE_URL = '/media/mixes' From dd8ca72e4aa1fce9b40aaf3ff511b688f567968b Mon Sep 17 00:00:00 2001 From: fergalmoran Date: Wed, 12 Sep 2012 09:43:50 +0100 Subject: [PATCH 2/2] Started pipeline stuff --- dss/settings.py | 18 ++++++++++++++++-- templates/base.html | 10 ++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/dss/settings.py b/dss/settings.py index fb5551a..a565f61 100644 --- a/dss/settings.py +++ b/dss/settings.py @@ -81,6 +81,7 @@ STATICFILES_DIRS = ( STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + 'compressor.finders.CompressorFinder', ) SECRET_KEY = '8*&j)j4lnq*ft*=jhajvc7&upaifb2f2s5(v6i($$+3p(4^bvd' @@ -111,7 +112,7 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.gzip.GZipMiddleware', #'debug_toolbar.middleware.DebugToolbarMiddleware', - #'pipeline.middleware.MinifyHTMLMiddleware' + 'pipeline.middleware.MinifyHTMLMiddleware' ) WSGI_APPLICATION = 'dss.wsgi.application' @@ -128,11 +129,12 @@ INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.admindocs', 'django_facebook', + 'compressor', 'djcelery', #'debug_toolbar', 'crispy_forms', 'sorl.thumbnail', - #'pipeline', + 'pipeline', 'south', # the only requirement for SCT 'avatar', 'notification', @@ -220,3 +222,15 @@ GOOGLE_ANALYTICS_CODE = localsettings.GOOGLE_ANALYTICS_CODE SENDFILE_BACKEND = localsettings.SENDFILE_BACKEND SENDFILE_ROOT = os.path.join(MEDIA_ROOT, 'mixes') SENDFILE_URL = '/media/mixes' +PIPELINE_CSS = { + 'site_css': { + 'source_filenames': ( + 'static/css/*.css' + ), + 'output_filename': 'static/css/dss_min.css', + 'extra_context': { + 'media': 'screen,projection', + }, + }, +} +COMPRESS_ENABLED = True diff --git a/templates/base.html b/templates/base.html index dc562a2..a615b6f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -4,7 +4,11 @@ Deep South Sounds {% include 'inc/meta.html' %} + + {% load compress %} + + {% compress css %} @@ -15,9 +19,10 @@ - + {% endcompress %} + {% compress js %} @@ -31,6 +36,7 @@ + {% endcompress %}