diff --git a/apps/main/templates/base.html b/apps/main/templates/base.html index 85eaa5f0dc..bce7da29e6 100644 --- a/apps/main/templates/base.html +++ b/apps/main/templates/base.html @@ -46,12 +46,11 @@ {% endblock %} {% block web_theme_javascript %} + - - + {% if enable_scroll_js %} #} #} {% endif %} {% block web_theme_javascript %}{% endblock %} - + + {% endcompress %}
diff --git a/requirements/development.txt b/requirements/development.txt index 1e9357ff11..10496b3b5d 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -16,3 +16,5 @@ pdfminer==20110227 APScheduler==2.0.2 django-grappelli==2.3.3 Pillow==1.7.4 +cssmin==0.1.4 +django-compressor==1.1 diff --git a/requirements/production.txt b/requirements/production.txt index b2ba31513a..ba444a2bbf 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -13,3 +13,5 @@ pdfminer==20110227 APScheduler==2.0.2 django-grappelli==2.3.3 Pillow==1.7.4 +cssmin==0.1.4 +django-compressor==1.1 diff --git a/settings.py b/settings.py index 25dcd3d12e..25182f6e98 100644 --- a/settings.py +++ b/settings.py @@ -162,6 +162,7 @@ INSTALLED_APPS = ( 'job_processor', 'history', 'main', + 'compressor', ) TEMPLATE_CONTEXT_PROCESSORS = ( @@ -173,6 +174,15 @@ TEMPLATE_CONTEXT_PROCESSORS = ( # 'django.contrib.messages.context_processors.messages', ) +STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + # other finders.. + 'compressor.finders.CompressorFinder', +) +COMPRESS_PARSER = 'compressor.parser.HtmlParser' +COMPRESS_CSS_FILTERS = ['compressor.filters.css_default.CssAbsoluteFilter', 'compressor.filters.cssmin.CSSMinFilter'] + #===== User configuration options =============== #--------- Pagination ------------------ #PAGINATION_DEFAULT_PAGINATION = 10