Quantcast
Channel: Call a Flask function every few minutes - Stack Overflow
Browsing all 2 articles
Browse latest View live

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 Article


Call 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

Browsing all 2 articles
Browse latest View live