forked from django-cms/cmsplugin-filer
-
Notifications
You must be signed in to change notification settings - Fork 14
/
test_settings.py
64 lines (58 loc) · 1.62 KB
/
test_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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from tempfile import mkdtemp
HELPER_SETTINGS = {
'INSTALLED_APPS': [
# filer configuration
'easy_thumbnails',
'mptt',
'filer',
'djangocms_text_ckeditor',
# cmsplugin_filer configuration
'cmsplugin_filer_folder',
'cmsplugin_filer_link',
'cmsplugin_filer_image',
'cmsplugin_filer_teaser',
'cmsplugin_filer_video',
],
'LANGUAGE_CODE': 'en',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
),
'CMS_LANGUAGES': {
1: [
{
'code': 'en',
'name': 'English',
'public': True,
},
{
'code': 'de',
'name': 'German',
'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(),
'FILER_IMAGE_MODEL': 'filer.Image',
}
if os.environ.get('CUSTOM_IMAGE', False):
HELPER_SETTINGS['FILER_IMAGE_MODEL'] = os.environ.get('CUSTOM_IMAGE', False)
HELPER_SETTINGS['INSTALLED_APPS'].append('filer.test_utils.custom_image')
def run():
from djangocms_helper import runner
runner.cms('cmsplugin_filer_file')
if __name__ == "__main__":
run()