From 8a9f93b9e0b79d514ae4bd411a3d293a74526549 Mon Sep 17 00:00:00 2001 From: Maxime Alves LIRMM Date: Wed, 23 Jun 2021 15:03:00 +0200 Subject: [PATCH] =?UTF-8?q?[conf]=20lecture=20des=20sections=20du=20nom=20?= =?UTF-8?q?des=20domaines=20activ=C3=A9s=20et=20ajout=20dans=20request.sco?= =?UTF-8?q?pe['config']['config']?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- halfapi/conf.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/halfapi/conf.py b/halfapi/conf.py index a89e09b..7b809db 100644 --- a/halfapi/conf.py +++ b/halfapi/conf.py @@ -153,6 +153,12 @@ if is_project(): 'project_name': PROJECT_NAME, 'production': PRODUCTION, 'secret': SECRET, - 'domains': DOMAINS + 'domains': DOMAINS, + 'config': {} } + for domain in DOMAINS: + if domain not in config.sections(): + continue + + CONFIG['config'][domain] = dict(config.items(domain))