diff --git a/main.py b/main.py index 9dafa75..ec68392 100644 --- a/main.py +++ b/main.py @@ -43,7 +43,9 @@ def record(): @app.route("/", methods = ['GET']) def normal(): return render_template('home.html', longer = record(), dates = wrap(values, 10), total = len(values.split(' ')), days = (datetime.datetime.today().date() - datetime.datetime.strptime(values.split(' ')[-1], "%Y-%m-%d").date()).days) - +@app.route("/data", methods = ['GET']) +def data(): + return render_template('data.html') if __name__ == '__main__': app.run(host='0.0.0.0', port=5000, debug=1) diff --git a/templates/data.html b/templates/data.html new file mode 100644 index 0000000..8d4bba8 --- /dev/null +++ b/templates/data.html @@ -0,0 +1,115 @@ + + +
+ ++ Data sur les incidents enregistrés +
+{{days}}
+
+ Nombre total de problèmes : {{total}}
+ Record de jours sans problèmes: {{longer}}
+