forked from divio/aldryn-common
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_settings.py
77 lines (65 loc) · 1.86 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
def noop_gettext(s):
return s
gettext = noop_gettext
HELPER_SETTINGS = {
'TIME_ZONE': 'UTC',
'INSTALLED_APPS': [
'aldryn_boilerplates',
'sortedm2m',
],
'CMS_PERMISSION': True,
'LANGUAGES': (
('en', 'English'),
('de', 'German'),
),
'CMS_LANGUAGES': {
'default': {
'public': True,
'hide_untranslated': False,
'fallbacks': ['en']
},
1: [
{
'public': True,
'code': 'en',
'fallbacks': [u'de'],
'hide_untranslated': False,
'name': gettext('en'),
'redirect_on_fallback': True,
},
{
'public': True,
'code': 'de',
'fallbacks': [u'en'],
'hide_untranslated': False,
'name': gettext('de'),
'redirect_on_fallback': True,
},
],
},
'EMAIL_BACKEND': 'django.core.mail.backends.locmem.EmailBackend',
'DEBUG': True,
'TEMPLATE_DEBUG': True,
'CACHES': {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
},
'MIDDLEWARE': [
'django.middleware.http.ConditionalGetMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
],
}
def run():
from djangocms_helper import runner
runner.run('aldryn_common', extra_args=[])
if __name__ == "__main__":
run()