-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_settings.py
107 lines (88 loc) · 2.49 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
import os
# ****** Esteid service settings ******
# Refer to esteid.settings for a comprehensive list of settings.
ESTEID_DEMO = True
ID_CARD_ENABLED = True
MOBILE_ID_ENABLED = True
SMART_ID_ENABLED = True
# ***** End of Esteid service settings ******
LANGUAGE_CODE = "en"
LANGUAGES = [
("en", "English"),
("et", "English"),
]
DEBUG = True
SECRET_KEY = "q^es5sedujo$g@%-d4tl9ws@z+#m1mab&sdr_5)r&a80_+kd@+"
ALLOWED_HOSTS = ["*"]
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "db.sqlite",
}
}
ROOT_URLCONF = "esteid.urls"
# Django pre-1.10 setting was MIDDLEWARE_CLASSES
MIDDLEWARE = [
"django.contrib.sessions.middleware.SessionMiddleware",
]
INSTALLED_APPS = [
"django.contrib.sessions",
"django.contrib.auth",
"django.contrib.contenttypes",
"rest_framework",
"esteid",
]
if "TOX_TESTS" not in os.environ:
INSTALLED_APPS += [
"sslserver",
]
USE_TZ = True
USE_I18N = True
USE_L10N = True
TZ = "UTC"
STATIC_URL = "/static/"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"OPTIONS": {
"context_processors": [
"django.template.context_processors.i18n",
"django.template.context_processors.tz",
"django.contrib.messages.context_processors.messages",
"django.template.context_processors.request",
"esteid.context_processors.esteid_services",
],
"loaders": [
"django.template.loaders.app_directories.Loader",
],
},
},
]
LOGGING = {
"version": 1,
"formatters": {"verbose": {"format": "%(asctime)s [%(levelname)s] %(name)s:%(lineno)d %(funcName)s - %(message)s"}},
"handlers": {
"console": {
"level": "DEBUG",
"class": "logging.StreamHandler",
"formatter": "verbose",
},
},
"loggers": {
"": {
"handlers": ["console"],
"level": "DEBUG",
},
"esteid": {"handlers": [], "propagate": True},
"django": {"handlers": [], "propagate": True},
"django.request": {"handlers": [], "propagate": True},
"django.security": {"handlers": [], "propagate": True},
},
}
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
try:
from local_settings import * # noqa
except ImportError:
print("No local_settings.py settings file found. Using default settings.")
pass