Added script setmainpage.py that sets initial main_page attributes for tags to reposi...
[wolnelektury.git] / apps / compress / conf / settings.py
1 from django.core.exceptions import ImproperlyConfigured
2 from django.conf import settings
3
4 COMPRESS = getattr(settings, 'COMPRESS', not settings.DEBUG)
5 COMPRESS_AUTO = getattr(settings, 'COMPRESS_AUTO', True)
6 COMPRESS_VERSION = getattr(settings, 'COMPRESS_VERSION', False)
7 COMPRESS_VERSION_PLACEHOLDER = getattr(settings, 'COMPRESS_VERSION_PLACEHOLDER', '?')
8 COMPRESS_VERSION_DEFAULT = getattr(settings, 'COMPRESS_VERSION_DEFAULT', '0')
9
10 COMPRESS_CSS_FILTERS = getattr(settings, 'COMPRESS_CSS_FILTERS', ['compress.filters.csstidy.CSSTidyFilter'])
11 COMPRESS_JS_FILTERS = getattr(settings, 'COMPRESS_JS_FILTERS', ['compress.filters.jsmin.JSMinFilter'])
12 COMPRESS_CSS = getattr(settings, 'COMPRESS_CSS', {})
13 COMPRESS_JS = getattr(settings, 'COMPRESS_JS', {})
14
15 if COMPRESS_CSS_FILTERS is None:
16     COMPRESS_CSS_FILTERS = []
17
18 if COMPRESS_JS_FILTERS is None:
19     COMPRESS_JS_FILTERS = []
20
21 if COMPRESS_VERSION and not COMPRESS_AUTO:
22     raise ImproperlyConfigured('COMPRESS_AUTO needs to be True when using COMPRESS_VERSION.')