diff options
author | Tyler Mandry <tmandry@gmail.com> | 2013-03-14 22:38:47 -0500 |
---|---|---|
committer | Tyler Mandry <tmandry@gmail.com> | 2013-03-16 01:30:21 -0500 |
commit | 050b65ab3b0f1914772e382678df978c6426888f (patch) | |
tree | 5bd4ecdc6c1eaed52db1c9014040ff5be1ba00c2 /askbot/setup_templates | |
parent | dcb2cf752a24ef78899bdcef65962c93cda40855 (diff) | |
download | askbot-050b65ab3b0f1914772e382678df978c6426888f.tar.gz askbot-050b65ab3b0f1914772e382678df978c6426888f.tar.bz2 askbot-050b65ab3b0f1914772e382678df978c6426888f.zip |
Add django_compressor to compress CSS, JS and automatically compile LESS
Diffstat (limited to 'askbot/setup_templates')
-rw-r--r-- | askbot/setup_templates/settings.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/askbot/setup_templates/settings.py b/askbot/setup_templates/settings.py index 237a1280..ee5f8935 100644 --- a/askbot/setup_templates/settings.py +++ b/askbot/setup_templates/settings.py @@ -116,6 +116,14 @@ MIDDLEWARE_CLASSES = ( 'askbot.middleware.spaceless.SpacelessMiddleware', ) +JINJA2_EXTENSIONS = ( + 'compressor.contrib.jinja2ext.CompressorExtension', +) + +COMPRESS_PRECOMPILERS = ( + ('text/less', 'lessc {infile} {outfile}'), +) + ROOT_URLCONF = os.path.basename(os.path.dirname(__file__)) + '.urls' @@ -176,6 +184,8 @@ INSTALLED_APPS = ( 'followit', 'tinymce', #'avatar',#experimental use git clone git://github.com/ericflo/django-avatar.git$ + + 'compressor', ) @@ -234,6 +244,11 @@ CSRF_COOKIE_NAME = 'askbot_csrf' STATICFILES_DIRS = ( ('default/media', os.path.join(ASKBOT_ROOT, 'media')), ) +STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + 'compressor.finders.CompressorFinder', +) RECAPTCHA_USE_SSL = True |