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 5
/
test_settings.py
100 lines (92 loc) · 2.97 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
# -*- coding: utf-8 -*-
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
PROJECT_PATH = os.path.abspath(
os.path.join(os.path.dirname(__file__), 'aldryn_reversion', 'test_helpers')
)
HELPER_SETTINGS = {
'INSTALLED_APPS': [
'djangocms_text_ckeditor',
'parler',
'reversion',
'aldryn_reversion',
'aldryn_reversion.test_helpers.project.test_app',
],
# affects test cases with translations
'PARLER_ENABLE_CACHING': False,
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
),
'PARLER_LANGUAGES': {
1: (
{'code': 'en', },
{'code': 'de', },
),
'default': {
'hide_untranslated': True,
}
},
'MIDDLEWARE_CLASSES': [
'django.contrib.sessions.middleware.SessionMiddleware',
'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'
],
'CMS_LANGUAGES': {
1: [
{
'code': 'de',
'name': 'Deutsche',
'fallbacks': ['en', ]
},
{
'code': 'en',
'name': 'English',
'fallbacks': ['de', ]
},
],
'default': {
'redirect_on_fallback': True,
}
},
'CMS_TEMPLATES': (
('simple.html', 'simple'),
),
'TEMPLATE_DIRS': [
os.path.abspath(os.path.join(PROJECT_PATH, 'project', 'templates'))],
'TEMPLATES': [{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.abspath(os.path.join(PROJECT_PATH, 'project', 'templates'))],
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.i18n',
'django.core.context_processors.debug',
'django.core.context_processors.request',
'django.core.context_processors.media',
'django.core.context_processors.csrf',
'django.core.context_processors.tz',
'django.core.context_processors.static',
],
'loaders': [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
'django.template.loaders.eggs.Loader',
],
},
}]
}
def run():
from djangocms_helper import runner
runner.cms('aldryn_reversion')
if __name__ == "__main__":
run()