diff --git a/.gitignore b/.gitignore index 99c06936..08e08461 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ __pycache__/ -local_settings.py \ No newline at end of file +local_settings.py +static-collected \ No newline at end of file diff --git a/hc/settings.py b/hc/settings.py index c672d526..581da01b 100644 --- a/hc/settings.py +++ b/hc/settings.py @@ -30,6 +30,7 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'compressor', 'djrill', 'hc.accounts', @@ -92,6 +93,13 @@ PING_ENDPOINT = SITE_ROOT + "/ping/" STATIC_URL = '/static/' STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] STATIC_ROOT = os.path.join(BASE_DIR, 'static-collected') +STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + 'compressor.finders.CompressorFinder', +) +COMPRESS_OFFLINE = True + EMAIL_BACKEND = "djrill.mail.backends.djrill.DjrillBackend" diff --git a/requirements.txt b/requirements.txt index df5c5440..df6db7ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ Django==1.8.2 +django_compressor psycopg2==2.6 djrill pygments \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 22936b9f..2dfb65a6 100644 --- a/templates/base.html +++ b/templates/base.html @@ -6,14 +6,17 @@ - {% load staticfiles %} + + {% load compress staticfiles %} + {% compress css %} + {% endcompress %}