-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal_settings.py
91 lines (81 loc) · 2.17 KB
/
local_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
# -*- coding: utf-8 -*-
# vhost: mpass-connector.csc.fi
from project.settings import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'conndata',
'HOST': '127.0.0.1',
'USER': 'conndata',
'PASSWORD': 'conndata',
}
}
USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SELECTOR_ROLEDB_API_TOKEN = '{{ secure.mpass.selector_roledb_api_token }}'
SELECTOR_ROLEDB_API_ROOT = '{{ secure.mpass.selector_roledb_api_root }}'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'root': {
'level': 'DEBUG',
# 'handlers': ['console', 'sentry'],
'handlers': ['console', 'file'],
},
'formatters': {
'normal': {
'format': '%(asctime)s %(levelname)s %(name)s %(thread)d %(lineno)s %(message)s %(data)s'
},
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s %(data)s'
},
},
'filters': {
'default': {
'()': 'project.logging_helpers.Filter',
},
},
'handlers': {
# 'sentry': {
# 'level': 'WARNING',
# 'class': 'raven.contrib.django.handlers.SentryHandler',
# },
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'verbose',
'filters': ['default'],
},
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': 'authdata.log',
'formatter': 'verbose'
},
},
'loggers': {
# 'sentry.errors': {
# 'level': 'DEBUG',
# 'handlers': ['console'],
# 'propagate': False,
# },
'django': {
'level': 'WARNING',
# 'handlers': ['console', 'sentry'],
'handlers': ['console', 'file'],
'propagate': True,
},
'selector': {
# 'handlers': ['console', 'sentry'],
'handlers': ['console', 'file'],
'level': 'DEBUG',
'propagate': False,
},
'': {
'handlers': ['console', 'file'],
'level': 'DEBUG',
'propagate': False,
},
},
}
# vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2