Configure refresh via config file
This commit is contained in:
parent
5031b1e8a2
commit
0f07fb70c8
3 changed files with 3 additions and 2 deletions
|
@ -1 +1,2 @@
|
|||
imgdir = "."
|
||||
refresh = 5
|
||||
|
|
|
@ -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/")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="5;url={{ url_for("random") }}">
|
||||
<meta http-equiv="refresh" content="{{ refresh }};url={{ url_for("random") }}">
|
||||
</head>
|
||||
<body bgcolor="black">
|
||||
<img src="{{ url_for("random_image") }}" style="height: 98%; width: 100%; object-fit: contain"/>
|
||||
|
|
Loading…
Reference in a new issue