128 lines
3.4 KiB
Python
128 lines
3.4 KiB
Python
import logging
|
|
import os
|
|
|
|
_PROJECT_PATH = os.path.join(os.path.dirname(__file__), '..')
|
|
|
|
## SQL Backend config
|
|
# Database configuration
|
|
# http://docs.sqlalchemy.org/en/rel_0_7/core/engines.html
|
|
# rfc 1738 https://tools.ietf.org/html/rfc1738
|
|
# dialect+driver://username:password@host:port/database
|
|
db_url = 'sqlite:///' + os.path.join(_PROJECT_PATH, 'rp_meyzieu.db')
|
|
|
|
debug = True
|
|
|
|
# Log configuration
|
|
LOGGING = {
|
|
'version': 1,
|
|
'disable_existing_loggers': True,
|
|
|
|
'formatters': {
|
|
'console': {
|
|
'format': '%(asctime)s %(levelname)s %(message)s',
|
|
'datefmt': '%H:%M:%S',
|
|
},
|
|
'file': {
|
|
'format': '%(asctime)s %(levelname)s %(uuid)s %(message)s',
|
|
'datefmt': '%Y-%m-%d %H:%M:%S'
|
|
}
|
|
},
|
|
'handlers': {
|
|
'console': {
|
|
'level': 'DEBUG',
|
|
'class': 'logging.StreamHandler',
|
|
'formatter': 'console'
|
|
},
|
|
'syslog': {
|
|
'level': 'INFO',
|
|
'class': 'entrouvert.logging.handlers.SysLogHandler',
|
|
'formatter': 'file',
|
|
'address': '/dev/log'
|
|
},
|
|
},
|
|
'loggers': {
|
|
'': {
|
|
'handlers': ['console'],
|
|
'level': 'DEBUG',
|
|
'propagate': False,
|
|
},
|
|
'mandaye': {
|
|
'handlers': ['console', 'syslog'],
|
|
'level': 'DEBUG',
|
|
'propagate': False,
|
|
},
|
|
'rp_meyzieu': {
|
|
'handlers': ['console', 'syslog'],
|
|
'level': 'DEBUG',
|
|
'propagate': False,
|
|
},
|
|
},
|
|
}
|
|
|
|
|
|
## PATH
|
|
# Template directory
|
|
template_directory = os.path.join(_PROJECT_PATH, 'rp_meyzieu/templates')
|
|
# Configuration directory
|
|
config_root = os.path.join(_PROJECT_PATH, 'conf.d')
|
|
# Static url
|
|
static_url = '/mandaye/static'
|
|
# Static folder
|
|
static_root = os.path.join(_PROJECT_PATH, 'rp_meyzieu/static')
|
|
# Data dir
|
|
data_dir = os.path.join(_PROJECT_PATH, 'data')
|
|
|
|
# Raven Sentry configuration
|
|
raven_dsn = None
|
|
|
|
# Email notification configuration
|
|
email_notification = False
|
|
email_prefix = '[Mandaye rp_meyzieu]'
|
|
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 = ''
|
|
|
|
# Supported authentification
|
|
authentifications = {
|
|
'saml2': 'mandaye.auth.saml2.SAML2Auth'
|
|
}
|
|
|
|
# sp mappers
|
|
mappers = {
|
|
'linuxfr': 'rp_meyzieu.mappers.linuxfr_example',
|
|
'portail_famille_ecities': 'rp_meyzieu.mappers.portail_famille_ecities',
|
|
}
|
|
|
|
# Beaker session configuration
|
|
session_opts = {
|
|
'session.type': 'file',
|
|
'session.cookie_expires': True,
|
|
'session.timeout': 3600,
|
|
'session.data_dir': '/var/tmp/beaker'
|
|
}
|
|
|
|
# Choose storage
|
|
# Only mandaye.backends.sql at the moment
|
|
storage_backend = "mandaye.backends.sql"
|
|
|
|
# Import local config
|
|
try:
|
|
from ..rp_meyzieu.local_config import *
|
|
except:
|
|
pass
|
|
|