↧
Answer by Joran Beasley for Call a Flask function every few minutes
flask_app.py add a route to your getStatus method...@app.route("/myStatus")def getStatus(): state = database().getState() if state: status = " On" else: status = "Off" return status ...page.html use...
View ArticleCall a Flask function every few minutes
On my HTML page I've got a span that gets the value of the function getStatus():<span id="sysStatus" style="font-weight: bold;">{{ status }}</span>The function that returns status:def...
View Article