This repository has been archived by the owner on Feb 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
test_settings.py
107 lines (100 loc) · 2.99 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
# -*- 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',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
),
'CMS_PERMISSION': True,
'INSTALLED_APPS': [
'adminsortable2',
'aldryn_translation_tools',
'djangocms_text_ckeditor',
'parler',
'sortedm2m',
'taggit',
# NOTE: The following is NOT required for new installs, it is, however,
# required for testing the migrations.
'adminsortable',
],
'HAYSTACK_CONNECTIONS': HAYSTACK_CONNECTIONS,
'PARLER_LANGUAGES': {
1: (
{'code': 'de', },
{'code': 'en', },
{'code': 'fr', },
),
'default': {
'hide_untranslated': False,
}
},
'PARLER_ENABLE_CACHING': False,
'SITE_ID': 1,
'CMS_LANGUAGES': {
1: [
{
'code': 'de',
'name': 'Deutsche',
'fallbacks': ['en', ]
},
{
'code': 'en',
'name': 'English',
'fallbacks': ['de', ]
},
{
'code': 'fr',
'name': 'French',
'fallbacks': ['en', ]
},
],
'default': {
'hide_untranslated': False,
}
},
'MIDDLEWARE_CLASSES': [
'cms.middleware.utils.ApphookReloadMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.language.LanguageCookieMiddleware'
],
}
def run():
from djangocms_helper import runner
runner.cms('aldryn_faq')
if __name__ == "__main__":
run()