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/global_config.py

85 lines
2.1 KiB
Python

import os
_PROJECT_PATH = os.path.join(os.path.dirname(__file__), '..')
# Choose storage
# Only mandaye.backends.sql at the moment
storage_backend = "mandaye.backends.sql"
## SQL Backend config
# Database configuration
# rfc 1738 http://rfc.net/rfc1738.html
db_url = 'sqlite:///test.db'
# Needed if ssl is activated
ssl = False
keyfile = ''
certfile = ''
# Log configuration
import logging
debug = False
syslog = False
log_file = os.path.join(_PROJECT_PATH, '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 = os.path.join(_PROJECT_PATH, 'mandaye/templates')
# Static folder
static_root = os.path.join(_PROJECT_PATH, 'mandaye/static')
# Data dir
data_dir = os.path.join(_PROJECT_PATH, 'data')
# 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 = {
'linuxfr.local:8000': [
{'path': r'/',
'target': 'http://linuxfr.org',
'mapping': 'mandaye.configs.linuxfr_saml_example.linuxfr_mapping'
},
{ 'path': r'/static',
'static': static_root
}
],
}
alembic_cfg = os.path.join(_PROJECT_PATH, 'mandaye/alembic.ini')
alembic_script_path = os.path.join(_PROJECT_PATH, 'mandaye/alembic')
# beaker session configuration
session_opts = {
'session.type': 'file',
'session.cookie_expires': True,
'session.timeout': 3600,
'session.data_dir': '/var/tmp/beaker'
}