106 lines
2.4 KiB
Python
106 lines
2.4 KiB
Python
import logging
|
|
from mandaye.exceptions import ImproperlyConfigured
|
|
|
|
# Database configuration
|
|
# rfc 1738 http://rfc.net/rfc1738.html
|
|
db_url = 'sqlite:///test.db'
|
|
|
|
# Default local backend
|
|
import mandaye.backends.sql
|
|
backend = mandaye.backends.sql
|
|
|
|
# Needed if ssl is activated
|
|
ssl = False
|
|
keyfile = ''
|
|
certfile = ''
|
|
|
|
# Log configuration
|
|
debug = False
|
|
syslog = False
|
|
log_file = '/var/log/mandaye/mandaye.log'
|
|
log_level = logging.INFO
|
|
|
|
# Log rotation
|
|
# W[0-6] : weekly (0: Monday), D: day, ... (python doc)
|
|
log_when = 'W6'
|
|
# Every week
|
|
log_interval = 1
|
|
# BackupCount (keep one year of log)
|
|
log_backup = 52
|
|
|
|
# Template directory
|
|
template_directory = 'mandaye/templates'
|
|
# Static folder
|
|
static_root = 'mandaye/static'
|
|
|
|
|
|
# Email notification configuration
|
|
email_notification = False
|
|
smtp_host = 'localhost'
|
|
smtp_port = 25
|
|
email_from = 'traceback@entrouvert.com'
|
|
email_to = ['admin@localhost']
|
|
|
|
# Use long traceback with xtraceback
|
|
use_long_trace = True
|
|
|
|
# Ask Mandaye to auto decompress a response message
|
|
# Decompress response only if you load a filter
|
|
auto_decompress = True
|
|
|
|
# Encrypt service provider passwords with a secret
|
|
# You should install pycypto to use this feature
|
|
encrypt_sp_password = False
|
|
# Must be a 16, 24, or 32 bytes long
|
|
encrypt_secret = ''
|
|
|
|
hosts = {
|
|
'localhost:8000': [
|
|
{'path': r'/',
|
|
'target': 'http://perdu.com',
|
|
'mapping': None
|
|
},
|
|
],
|
|
}
|
|
|
|
#example_mapping = [
|
|
# {
|
|
# 'path': r'/'
|
|
# 'on_response': [{
|
|
# 'filter': 'module.path.to.my_filter',
|
|
# 'values': {}
|
|
# }]
|
|
# },
|
|
# {
|
|
# 'path': r'/test$'
|
|
# 'method': 'GET',
|
|
# 'content-types': ['text/html', 'text/plain'],
|
|
# 'response': [{
|
|
# 'filter': 'my_test',
|
|
# 'values': {
|
|
# 'toto': 'titi',
|
|
# }
|
|
# }]
|
|
# },
|
|
#]
|
|
|
|
# beaker session
|
|
session_opts = {
|
|
'session.type': 'file',
|
|
'session.cookie_expires': True,
|
|
'session.timeout': 3600,
|
|
'session.data_dir': '/var/tmp/beaker',
|
|
}
|
|
|
|
# token timeout
|
|
# timeout in seconds
|
|
token_timeout = 60
|
|
|
|
# Import local settings
|
|
try:
|
|
from mandaye.local_config import *
|
|
except ImportError, e:
|
|
if not 'local_config' in e.args[0]:
|
|
raise ImproperlyConfigured('Error while importing "local_config.py"')
|
|
|