summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérôme Schneider <jschneider@entrouvert.com>2014-09-12 08:16:40 (GMT)
committerJérôme Schneider <jschneider@entrouvert.com>2014-09-12 08:16:40 (GMT)
commit8f7acbbdd96ba1142c85231dbe5f6263a2df9203 (patch)
tree517c90ac0011a706f5285251e4e27a2a0454c74d
parent12ad70e3f118e38dd8636264646f627c88c08812 (diff)
downloadmandaye-meyzieu-8f7acbbdd96ba1142c85231dbe5f6263a2df9203.zip
mandaye-meyzieu-8f7acbbdd96ba1142c85231dbe5f6263a2df9203.tar.gz
mandaye-meyzieu-8f7acbbdd96ba1142c85231dbe5f6263a2df9203.tar.bz2
rp_meyzieu: fixes configuration to work with the new mandaye version
-rw-r--r--rp_meyzieu/config.py13
-rw-r--r--rp_meyzieu/default-config.ini4
2 files changed, 15 insertions, 2 deletions
diff --git a/rp_meyzieu/config.py b/rp_meyzieu/config.py
index ee630c0..513e329 100644
--- a/rp_meyzieu/config.py
+++ b/rp_meyzieu/config.py
@@ -85,8 +85,11 @@ if config.getboolean('debug', 'log_debug'):
## PATH
# Configuration directory
config_root = config.get('dirs', 'config_root')
-# Template directory
-template_directory = os.path.join(BASE_DIR, 'templates')
+# Templates directories
+templates_directories = []
+if config.get('dirs', 'templates_directories'):
+ templates_directories = config.get('dirs', 'templates_directories').split(' ')
+templates_directories.append(os.path.join(BASE_DIR, 'templates'))
# Static url
static_url = config.get('dirs', 'static_url')
# Static folder
@@ -94,6 +97,12 @@ static_root = config.get('dirs', 'static_root')
# Data dir
data_dir = config.get('dirs', 'data_dir')
+# template vars
+template_vars = {}
+if config.has_section('template_vars'):
+ for option in config.options('template_vars'):
+ template_vars[option] = config.get('template_vars', option)
+
# Supported authentification
authentifications = {
'saml2': 'mandaye.auth.saml2.SAML2Auth'
diff --git a/rp_meyzieu/default-config.ini b/rp_meyzieu/default-config.ini
index 5cda540..46ca86d 100644
--- a/rp_meyzieu/default-config.ini
+++ b/rp_meyzieu/default-config.ini
@@ -10,6 +10,7 @@ config_root: %(base_dir)s/conf.d
data_dir: %(base_dir)s/data
static_root: %(base_dir)s/mandaye_meyzieu/static
static_url: /mandaye/static
+templates_directories:
[debug]
debug: false
@@ -18,6 +19,9 @@ log_debug: false
; you need to install python-raven for this feature
sentry_dsn:
+[template_vars]
+portal_url: https://mon.meyzieu.fr
+
[mandaye]
toolbar: false
offline_toolbar: false