diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-04 19:18:24 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-04 19:18:24 -0400 |
commit | d199a0af53e36311ccfd94c9581e00c952e63a0a (patch) | |
tree | 5e8c18365a3922d15bea8b626979c224d2a08eaf | |
parent | d8c42b6689c887cb8aa9850fb16d515ea381fb72 (diff) | |
download | askbot-d199a0af53e36311ccfd94c9581e00c952e63a0a.tar.gz askbot-d199a0af53e36311ccfd94c9581e00c952e63a0a.tar.bz2 askbot-d199a0af53e36311ccfd94c9581e00c952e63a0a.zip |
updated the setup template files
-rw-r--r-- | askbot/setup_templates/settings.py | 6 | ||||
-rw-r--r-- | askbot/setup_templates/settings.py.mustache | 6 | ||||
-rw-r--r-- | askbot/startup_procedures.py | 28 |
3 files changed, 27 insertions, 13 deletions
diff --git a/askbot/setup_templates/settings.py b/askbot/setup_templates/settings.py index 3b41dfbd..62a7b49c 100644 --- a/askbot/setup_templates/settings.py +++ b/askbot/setup_templates/settings.py @@ -170,6 +170,7 @@ INSTALLED_APPS = ( 'django.contrib.humanize', 'django.contrib.sitemaps', 'django.contrib.messages', + 'compressor', #'debug_toolbar', #'haystack', 'askbot', @@ -297,3 +298,8 @@ GROUP_MESSAGING = { } ASKBOT_MULTILINGUAL = False + +if ASKBOT_CSS_DEVEL == True: + COMPRESS_PRECOMPILERS = ( + ('text/less', 'lessc {infile} {outfile}'), + ) diff --git a/askbot/setup_templates/settings.py.mustache b/askbot/setup_templates/settings.py.mustache index 61ee5993..b2893b3c 100644 --- a/askbot/setup_templates/settings.py.mustache +++ b/askbot/setup_templates/settings.py.mustache @@ -167,6 +167,7 @@ INSTALLED_APPS = ( #'debug_toolbar', #Optional, to enable haystack search #'haystack', + 'compressor', 'askbot', 'askbot.deps.django_authopenid', #'askbot.importers.stackexchange', #se loader @@ -288,3 +289,8 @@ GROUP_MESSAGING = { } ASKBOT_MULTILINGUAL = False + +if ASKBOT_CSS_DEVEL == True: + COMPRESS_PRECOMPILERS = ( + ('text/less', 'lessc {infile} {outfile}'), + ) diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py index 7d2e0216..31bc5c3d 100644 --- a/askbot/startup_procedures.py +++ b/askbot/startup_procedures.py @@ -309,22 +309,24 @@ def test_celery(): def test_compressor(): """test settings for django compressor""" - precompilers = getattr(django_settings, 'COMPRESS_PRECOMPILERS', None) errors = list() - lessc_item = ('text/less', 'lessc {infile} {outfile}') - if precompilers is None: - errors.append( - 'Please add to your settings.py file: \n' - 'COMPRESS_PRECOMPILERS = (\n' - " ('%s', '%s'),\n" - ')' % lessc_item - ) - else: - if lessc_item not in precompilers: + + if getattr(django_settings, 'ASKBOT_CSS_DEVEL', False): + precompilers = getattr(django_settings, 'COMPRESS_PRECOMPILERS', None) + lessc_item = ('text/less', 'lessc {infile} {outfile}') + if precompilers is None: errors.append( - 'Please add to the COMPRESS_PRECOMPILERS the following item:\n' - "('%s', '%s')," % lessc_item + 'Please add to your settings.py file: \n' + 'COMPRESS_PRECOMPILERS = (\n' + " ('%s', '%s'),\n" + ')' % lessc_item ) + else: + if lessc_item not in precompilers: + errors.append( + 'Please add to the COMPRESS_PRECOMPILERS the following item:\n' + "('%s', '%s')," % lessc_item + ) js_filters = getattr(django_settings, 'COMPRESS_JS_FILTERS', []) if len(js_filters) > 0: |