forked from divio/aldryn-people
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_settings.py
116 lines (108 loc) · 3.14 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://localhost:9001/solr/default',
'TIMEOUT': 60 * 5,
'INCLUDE_SPELLING': True,
'BATCH_SIZE': 100,
'EXCLUDED_INDEXES': ['thirdpartyapp.search_indexes.BarIndex'],
},
'en': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://my-solr-server/solr/my-site-en/',
'TIMEOUT': 60 * 5,
'INCLUDE_SPELLING': True,
'BATCH_SIZE': 100,
},
'de': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://my-solr-server/solr/my-site-de/',
'TIMEOUT': 60 * 5,
'INCLUDE_SPELLING': True,
'BATCH_SIZE': 100,
},
}
HELPER_SETTINGS = {
'TIME_ZONE': 'Europe/Zurich',
'HAYSTACK_CONNECTIONS': HAYSTACK_CONNECTIONS,
'INSTALLED_APPS': [
'aldryn_common',
'aldryn_translation_tools',
'djangocms_text_ckeditor',
'easy_thumbnails',
'filer',
'parler',
'sortedm2m',
],
'THUMBNAIL_PROCESSORS': (
'easy_thumbnails.processors.colorspace',
'easy_thumbnails.processors.autocrop',
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
'easy_thumbnails.processors.filters',
),
'CMS_PERMISSION': True,
# At present, testing requires bootstrap to be disabled.
# 'ALDRYN_BOILERPLATE_NAME': 'bootstrap3',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
),
'CMS_LANGUAGES': {
1: [
{
'code': 'de',
'name': 'Deutsche',
'fallbacks': ['en', ] # FOR TESTING DO NOT ADD 'fr' HERE
},
{
'code': 'fr',
'name': 'Française',
'fallbacks': ['en', ] # FOR TESTING DO NOT ADD 'de' HERE
},
{
'code': 'en',
'name': 'English',
'fallbacks': ['de', 'fr', ]
},
{
'code': 'it',
'name': 'Italiano',
'fallbacks': ['fr', ] # FOR TESTING, LEAVE AS ONLY 'fr'
},
],
},
# app-specific
'PARLER_LANGUAGES': {
1: [
{
'code': u'en',
'fallbacks': ['de', 'fr'],
'hide_untranslated': False
},
{
'code': u'fr',
'fallbacks': [u'en'],
'hide_untranslated': False
},
{
'code': u'de',
'fallbacks': [u'en'],
'hide_untranslated': False
}
],
'default': {
'code': u'en',
'fallbacks': [u'en'],
'hide_untranslated': False}
},
'PARLER_ENABLE_CACHING': False,
'LANGUAGE_CODE': 'en',
}
def run():
from djangocms_helper import runner
runner.cms('aldryn_people', extra_args=[]) # , extra_args=['--boilerplate']
if __name__ == "__main__":
run()