forked from django-cms/djangocms-alias
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_settings.py
119 lines (112 loc) · 3.26 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
117
118
119
import os
from distutils.util import strtobool
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
ENABLE_VERSIONING = strtobool(os.environ.get('ENABLE_VERSIONING', "1"))
EXTRA_INSTALLED_APPS = []
if ENABLE_VERSIONING:
EXTRA_INSTALLED_APPS.append('djangocms_versioning')
HELPER_SETTINGS = {
'SECRET_KEY': 'test1234',
'TIME_ZONE': 'Europe/Zurich',
'TOP_INSTALLED_APPS': [
'djangocms_alias',
],
'INSTALLED_APPS': [
'parler',
'djangocms_alias.test_utils.text',
] + EXTRA_INSTALLED_APPS,
'VERSIONING_ALIAS_MODELS_ENABLED': ENABLE_VERSIONING,
'MIGRATION_MODULES': {
'sites': None,
'contenttypes': None,
'auth': None,
'cms': None,
'menus': None,
'text': None,
'djangocms_alias': None,
'djangocms_versioning': None,
},
'CMS_PERMISSION': True,
# At present, testing requires bootstrap to be disabled.
# 'ALDRYN_BOILERPLATE_NAME': 'bootstrap3',
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
('fr', 'French'),
('it', 'Italiano'),
),
'CMS_LANGUAGES': {
1: [
{
'code': 'en',
'name': 'English',
'fallbacks': ['de', 'fr']
},
{
'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': 'it',
'name': 'Italiano',
'fallbacks': ['fr'] # FOR TESTING, LEAVE AS ONLY 'fr'
},
],
},
'TEMPLATE_DIRS': [
os.path.join('tests', 'templates'),
],
'CMS_TEMPLATES': (
("fullwidth.html", "Fullwidth"),
("page.html", "Normal page"),
('static_alias.html', 'Static Alias Template'),
),
'PARLER_LANGUAGES': {
1: [
{
'code': 'en',
'fallbacks': ['de', 'fr'],
'hide_untranslated': False,
},
{
'code': 'de',
'fallbacks': ['en'],
'hide_untranslated': False,
},
{
'code': 'fr',
'fallbacks': ['en'],
'hide_untranslated': False,
},
{
'code': 'it',
'fallbacks': ['fr'], # FOR TESTING, LEAVE AS ONLY 'fr'
'hide_untranslated': False,
},
],
'default': {
'code': 'en',
'fallbacks': ['en'],
'hide_untranslated': False,
}
},
'PARLER_ENABLE_CACHING': False,
'LANGUAGE_CODE': 'en',
'DJANGOCMS_ALIAS_TEMPLATES': [
('custom_alias_template', 'Custom Template Name'),
],
"DEFAULT_AUTO_FIELD": "django.db.models.AutoField",
# Due to a recent temporary change in develop-4, we now need to confirm that we intend to use v4
"CMS_CONFIRM_VERSION4": True,
}
def run():
from app_helper import runner
runner.cms('djangocms_alias', extra_args=[])
if __name__ == "__main__":
run()