This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
mandaye/mandaye/config.py

85 lines
1.9 KiB
Python

import logging
from mandaye.exceptions import ImproperlyConfigured
# 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
# Template directory
template_directory = 'mandaye/templates'
# Static folder
static_root = 'mandaye/static'
# Database configuration
# rfc 1738 http://rfc.net/rfc1738.html
db_url = 'sqlite:///test.db'
# Email notification configuration
email_notification = False
smtp_host = 'localhost'
smtp_port = 25
email_from = 'traceback@entrouvert.com'
email_to = ['admin@localhost']
# Encrypt external passwords with a secret
encrypt_ext_password = False
# Must be a 16, 24, or 32 bytes long
encrypt_secret = ''
hosts = {
'localhost:8088': [
{'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',
# 'response': [{
# 'filter': 'my_test',
# 'values': {
# 'toto': 'titi',
# }
# }]
# },
#]
# beaker session
session_opts = {
'session.type': 'file',
'session.cookie_expires': True,
'session.data_dir': '/tmp/beaker/data',
'session.lock_dir': '/tmp/beaker/lock',
'session.expire': 3600,
}
# token timeout (for Vincennes)
# 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"')