1
|
import logging
|
2
|
from mandaye.exceptions import ImproperlyConfigured
|
3
|
|
4
|
# Needed if ssl is activated
|
5
|
ssl = False
|
6
|
keyfile = ''
|
7
|
certfile = ''
|
8
|
|
9
|
# Log configuration
|
10
|
debug = False
|
11
|
syslog = False
|
12
|
log_file = '/var/log/mandaye/mandaye.log'
|
13
|
log_level = logging.INFO
|
14
|
# Log rotation
|
15
|
# W[0-6] : weekly (0: Monday), D: day, ... (python doc)
|
16
|
log_when = 'W6'
|
17
|
# Every week
|
18
|
log_interval = 1
|
19
|
# BackupCount (keep one year of log)
|
20
|
log_backup = 52
|
21
|
|
22
|
# Template directory
|
23
|
template_directory = 'mandaye/templates'
|
24
|
# Static folder
|
25
|
static_root = 'mandaye/static'
|
26
|
|
27
|
# Database configuration
|
28
|
# rfc 1738 http://rfc.net/rfc1738.html
|
29
|
db_url = 'sqlite:///test.db'
|
30
|
|
31
|
# Email notification configuration
|
32
|
email_notification = False
|
33
|
smtp_host = 'localhost'
|
34
|
smtp_port = 25
|
35
|
email_from = 'traceback@entrouvert.com'
|
36
|
email_to = ['admin@localhost']
|
37
|
|
38
|
# Encrypt external passwords with a secret
|
39
|
# You should install pycypto to use this feature
|
40
|
encrypt_ext_password = False
|
41
|
# Must be a 16, 24, or 32 bytes long
|
42
|
encrypt_secret = ''
|
43
|
|
44
|
hosts = {
|
45
|
'localhost:8088': [
|
46
|
{'path': r'/',
|
47
|
'target': 'http://perdu.com',
|
48
|
'mapping': None
|
49
|
},
|
50
|
],
|
51
|
}
|
52
|
|
53
|
#example_mapping = [
|
54
|
# {
|
55
|
# 'path': r'/'
|
56
|
# 'on_response': [{
|
57
|
# 'filter': 'module.path.to.my_filter',
|
58
|
# 'values': {}
|
59
|
# }]
|
60
|
# },
|
61
|
# {
|
62
|
# 'path': r'/test$'
|
63
|
# 'method': 'GET',
|
64
|
# 'response': [{
|
65
|
# 'filter': 'my_test',
|
66
|
# 'values': {
|
67
|
# 'toto': 'titi',
|
68
|
# }
|
69
|
# }]
|
70
|
# },
|
71
|
#]
|
72
|
|
73
|
# beaker session
|
74
|
session_opts = {
|
75
|
'session.type': 'file',
|
76
|
'session.cookie_expires': True,
|
77
|
'session.data_dir': '/tmp/beaker/data',
|
78
|
'session.lock_dir': '/tmp/beaker/lock',
|
79
|
'session.expire': 3600,
|
80
|
}
|
81
|
|
82
|
# token timeout
|
83
|
# timeout in seconds
|
84
|
token_timeout = 60
|
85
|
|
86
|
# Import local settings
|
87
|
try:
|
88
|
from mandaye.local_config import *
|
89
|
except ImportError, e:
|
90
|
if not 'local_config' in e.args[0]:
|
91
|
raise ImproperlyConfigured('Error while importing "local_config.py"')
|
92
|
|