From 0f07fb70c8aae673b73ed069c54640baa74fd93b Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Mon, 5 Nov 2018 22:01:57 +0100 Subject: [PATCH] Configure refresh via config file --- config.py | 1 + slider.py | 2 +- templates/random.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 533ba28..ced3d85 100644 --- a/config.py +++ b/config.py @@ -1 +1,2 @@ imgdir = "." +refresh = 5 diff --git a/slider.py b/slider.py index f4f8bcf..9b0259e 100755 --- a/slider.py +++ b/slider.py @@ -12,7 +12,7 @@ app = Flask(__name__) @app.route("/") def random(): - return render_template("random.html") + return render_template("random.html", refresh=config.refresh) @app.route("/random_image/") diff --git a/templates/random.html b/templates/random.html index 1e3837f..4050ccb 100644 --- a/templates/random.html +++ b/templates/random.html @@ -1,6 +1,6 @@ - +