-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathrun_settings.py
78 lines (56 loc) · 2.11 KB
/
run_settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
'''
Copyright (C) 2014 Codility Limited. <https://codility.com>
This file is part of Candidate User Interface (CUI).
CUI is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version accepted in a public statement
by Codility Limited.
CUI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with CUI. If not, see <http://www.gnu.org/licenses/>.
'''
import os
# helper function to locate this dir
here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x)
DEBUG = TEMPLATE_DEBUG = True
ROOT_URLCONF = 'run_urls'
# Unused, but required by test runner.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
'TEST_NAME': ':memory:',
}
}
# Unused.
SECRET_KEY = '42'
TEMPLATE_DIRS = (here('templates/'),)
STATIC_URL = '/static/'
CUI_STATIC_DIR = here('static')
STATICFILES_DIRS = [CUI_STATIC_DIR]
# Django-compressor (for SCSS files)
INSTALLED_APPS = ['django.contrib.staticfiles', 'compressor']
COMPRESS_ENABLED = False
COMPRESS_OFFLINE = False
COMPRESS_PRECOMPILERS = (
('text/x-scss', 'bundle exec sass {infile} {outfile} --scss'),
)
COMPRESS_CSS_FILTERS = [
'compressor.filters.css_default.CssAbsoluteFilter',
'compressor.filters.cssmin.CSSMinFilter', # out of the box
]
COMPRESS_OUTPUT_DIR = ''
# See https://github.com/django-compressor/django-compressor/issues/261
COMPRESS_PARSER = 'compressor.parser.HtmlParser'
COMPRESS_ROOT = here('static_auto')
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'compressor.finders.CompressorFinder',
)
# Testing
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
MIDDLEWARE_CLASSES = ()