From d1adaee78c4158d659340c53a068225075d29841 Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Mon, 3 Apr 2023 22:10:09 +0200 Subject: [PATCH] Store hosting information in .env --- .env.dist | 2 ++ truthinquiry/routes/routes_ui.py | 5 ++++- truthinquiry/templates/legal.html | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.env.dist b/.env.dist index add48f1..6e3a35f 100644 --- a/.env.dist +++ b/.env.dist @@ -6,6 +6,8 @@ GAME_LIMIT=100 GAME_TIMEOUT=1800 ADMIN_PASSWORD="s0meV3ryL0ngP@sswOrd" +HOSTING_INFO="hosted at 'SomeProvider'" + # Database DB_HOST="" DB_PORT=3306 diff --git a/truthinquiry/routes/routes_ui.py b/truthinquiry/routes/routes_ui.py index e2ffd18..51ee640 100644 --- a/truthinquiry/routes/routes_ui.py +++ b/truthinquiry/routes/routes_ui.py @@ -1,3 +1,5 @@ +import os + import flask routes_ui = flask.Blueprint("ui", __name__) @@ -20,7 +22,8 @@ def licenses(): @routes_ui.route("/legal") def legal(): - return flask.render_template("legal.html") + hosting_info = os.getenv("HOSTING_INFO") + return flask.render_template("legal.html", hosting_info=hosting_info) @routes_ui.route("/docs") def doc(): diff --git a/truthinquiry/templates/legal.html b/truthinquiry/templates/legal.html index a630411..1f4158c 100644 --- a/truthinquiry/templates/legal.html +++ b/truthinquiry/templates/legal.html @@ -18,7 +18,7 @@
Ce site web est hébergé par InovaPerf, dont l'adresse est 14 rue Charles-V 75004 Paris et dont le numéro de téléphone est 09 72 54 63 63.
+{{ hosting_info }}
Le code de ce jeu est ouvert et disponible sous license MIT à l'adresse suivante : https://github.com/ThomasRubini/SAE-A2-TruthInquiry