summaryrefslogtreecommitdiffstats
path: root/rp_meyzieu/config.py
blob: 71c428b604dd6f66678967e3731e8f020dba2dfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
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 = False

# Log configuration
LOGGING = {
        'version': 1,
        'disable_existing_loggers': True,

        'formatters': {
            'console': {
                'format': '%(asctime)s %(levelname)s %(message)s',
                'datefmt': '%H:%M:%S',
                },
            'syslog': {
                'format': 'mandaye-meyzieu(pid=%(process)d) %(name)s %(levelname)s %(uuid)s %(message)s',
                }
            },
        'handlers': {
            'console': {
                'level': 'DEBUG',
                'class': 'logging.StreamHandler',
                'formatter': 'console'
                },
            'syslog': {
                'level': 'INFO',
                'class': 'entrouvert.logging.handlers.SysLogHandler',
                'formatter': 'syslog',
                '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 = False

# 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 local_settings import *
except ImportError, e:
    if 'local_settings' in e.args[0]:
        pass