diff --git a/fabfile.py b/fabfile.py index 2d3644e8..d1ae5e17 100644 --- a/fabfile.py +++ b/fabfile.py @@ -163,7 +163,7 @@ def collectstatic(): """ collect_remote_statics() dj('collectstatic --link --noinput') - # dj('compress') + dj('compress') # with cd('{virtualenv_dir}/var/static'.format(**env)): # fix_permissions() diff --git a/requirements.pip b/requirements.pip index 93acadbe..3c22d407 100644 --- a/requirements.pip +++ b/requirements.pip @@ -9,4 +9,5 @@ django==1.4.2 git+git://github.com/petry/django-foundation.git git+git://github.com/yohanboniface/django-chickpea.git git+git://github.com/frankban/django-endless-pagination.git -hg+https://bitbucket.org/liberation/sesql \ No newline at end of file +hg+https://bitbucket.org/liberation/sesql +django_compressor \ No newline at end of file diff --git a/youmap/settings/base.py b/youmap/settings/base.py index 9f375ac1..67903ed8 100644 --- a/youmap/settings/base.py +++ b/youmap/settings/base.py @@ -30,6 +30,7 @@ INSTALLED_APPS = ( 'endless_pagination', 'youmap', 'sesql', + 'compressor', #'south', @@ -95,6 +96,10 @@ STATICFILES_DIRS = ( os.path.join(PROJECT_DIR, 'static'), ) +STATICFILES_FINDERS += ( + 'compressor.finders.CompressorFinder', +) + #============================================================================== # Templates #============================================================================== @@ -129,3 +134,5 @@ AUTHENTICATION_BACKENDS += ( #============================================================================== # Third party app settings #============================================================================== +COMPRESS_ENABLED = True +COMPRESS_OFFLINE = True diff --git a/youmap/templates/base.html b/youmap/templates/base.html index 6a06c3db..32549a48 100644 --- a/youmap/templates/base.html +++ b/youmap/templates/base.html @@ -1,20 +1,21 @@ +{% load compress %}