zoo/debian/debian_config.py

44 lines
962 B
Python

# This file is sourced by "execfile" from passerelle.settings
# Debian defaults
DEBUG = False
PROJECT_NAME = 'zoo'
# SAML2 authentication
INSTALLED_APPS += ('mellon',)
AUTHENTICATION_BACKENDS = (
'mellon.backends.SAMLBackend',
'django.contrib.auth.backends.ModelBackend',
)
LOGIN_URL = '/login/'
LOGIN_REDIRECT_URL = '/'
LOGOUT_URL = '/logout/'
MELLON_ATTRIBUTE_MAPPING = {
'email': '{attributes[email][0]}',
'first_name': '{attributes[first_name][0]}',
'last_name': '{attributes[last_name][0]}',
}
MELLON_SUPERUSER_MAPPING = {
'is_superuser': 'true',
}
MELLON_USERNAME_TEMPLATE = '{attributes[name_id_content]}'
MELLON_IDENTITY_PROVIDERS = []
#
# hobotization (multitenant)
#
execfile('/usr/lib/hobo/debian_config_common.py')
# suds logs are buggy
LOGGING['loggers']['suds'] = {
'level': 'ERROR',
'handlers': ['mail_admins', 'sentry'],
'propagate': True,
}
execfile('/etc/%s/settings.py' % PROJECT_NAME)