diff --git a/pgaweb/settings.py b/pgaweb/settings.py index 2ad99c9..7df43b8 100644 --- a/pgaweb/settings.py +++ b/pgaweb/settings.py @@ -49,7 +49,8 @@ INSTALLED_APPS = ( 'download', 'faq', 'news', - 'versions' + 'versions', + 'static_precompiler' ) MIDDLEWARE_CLASSES = ( @@ -121,7 +122,17 @@ USE_TZ = True # https://docs.djangoproject.com/en/1.8/howto/static-files/ STATIC_URL = '/static/' -STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),) +STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'), os.path.join(BASE_DIR, 'pgaweb', 'static')) + +STATIC_PRECOMPILER_ROOT = 'static' + +STATIC_PRECOMPILER_COMPILERS = ( + ('static_precompiler.compilers.libsass.SCSS', { + "sourcemap_enabled": True, + # "load_paths": ["/static/css"], + "precision": 8, + }), +) # Load local settings overrides from settings_local import * diff --git a/static/css/pgaweb.css b/pgaweb/static/css/pgaweb.scss similarity index 100% rename from static/css/pgaweb.css rename to pgaweb/static/css/pgaweb.scss diff --git a/pgaweb/templates/pgaweb/base.html b/pgaweb/templates/pgaweb/base.html index f5ea6a6..bece71f 100755 --- a/pgaweb/templates/pgaweb/base.html +++ b/pgaweb/templates/pgaweb/base.html @@ -1,4 +1,7 @@ {% load staticfiles %} +{% load compile_static %} +{% load static %} + @@ -15,7 +18,7 @@ - +