From 8002e3c2d0b055703e105eb0c441ab86038f301c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Schneider?= Date: Fri, 29 Aug 2014 19:17:07 +0200 Subject: [PATCH] add template vars --- mandaye_vincennes/config.py | 6 ++++++ mandaye_vincennes/default-config.ini | 3 +++ mandaye_vincennes/templates/toolbar.html | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mandaye_vincennes/config.py b/mandaye_vincennes/config.py index 980e8aa..f5825b1 100644 --- a/mandaye_vincennes/config.py +++ b/mandaye_vincennes/config.py @@ -99,6 +99,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/mandaye_vincennes/default-config.ini b/mandaye_vincennes/default-config.ini index 48e9019..f2d57f2 100644 --- a/mandaye_vincennes/default-config.ini +++ b/mandaye_vincennes/default-config.ini @@ -32,6 +32,9 @@ encrypt_sp_password: false ; must be a 16, 24, or 32 bytes long encrypt_secret: +[template_vars] +wcs_url: https://demarches.vincennes.fr + [session] ; file, dbm, memory or memcached ; if memcached you need to install python-memcached and memcached diff --git a/mandaye_vincennes/templates/toolbar.html b/mandaye_vincennes/templates/toolbar.html index 9fcb976..dd1e8ce 100644 --- a/mandaye_vincennes/templates/toolbar.html +++ b/mandaye_vincennes/templates/toolbar.html @@ -7,10 +7,10 @@
- + Compte citoyen - + Démarches