forked from django-cms/django-filer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
85 lines (78 loc) · 2.3 KB
/
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
79
80
81
82
83
84
85
import os
from tempfile import mkdtemp
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
HELPER_SETTINGS = {
'NOSE_ARGS': [
'-s',
],
'ROOT_URLCONF': 'tests.utils.urls',
'INSTALLED_APPS': [
'easy_thumbnails',
'filer',
'tests.utils.test_app',
'tests.utils.extended_app',
],
'LANGUAGE_CODE': 'en',
'LANGUAGES': (
('en', 'English'),
('fr', 'French'),
('it', 'Italiano'),
),
'CMS_LANGUAGES': {
1: [
{
'code': 'en',
'name': 'English',
'public': True,
},
{
'code': 'it',
'name': 'Italiano',
'public': True,
},
{
'code': 'fr',
'name': 'French',
'public': True,
},
],
'default': {
'hide_untranslated': False,
},
},
'THUMBNAIL_PROCESSORS': (
'easy_thumbnails.processors.colorspace',
'easy_thumbnails.processors.autocrop',
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
'easy_thumbnails.processors.filters',
),
'FILE_UPLOAD_TEMP_DIR': mkdtemp(),
'TEMPLATE_DIRS': (os.path.join(BASE_DIR, 'django-filer', 'filer', 'utils', 'templates'),),
'FILER_CANONICAL_URL': 'test-path/',
'FILER_STORAGES': {
"public": {
"main": {
"ENGINE": 'django.core.files.storage.FileSystemStorage',
"OPTIONS": {
"base_url": "/media/my-preferred-base-url-for-source-files/",
}
},
"thumbnails": {
"ENGINE": 'django.core.files.storage.FileSystemStorage',
"OPTIONS": {
"base_url": "/media/my-preferred-base-url-for-thumbnails/",
}
}
}
},
'SECRET_KEY': '__secret__',
'DEFAULT_AUTO_FIELD': 'django.db.models.AutoField',
}
if os.environ.get('CUSTOM_IMAGE', False):
HELPER_SETTINGS['FILER_IMAGE_MODEL'] = os.environ.get('CUSTOM_IMAGE')
HELPER_SETTINGS['INSTALLED_APPS'].append('tests.utils.custom_image')
def run():
from app_helper import runner
runner.run('filer')
if __name__ == '__main__':
run()