Start the process of making HTTP requests aync
This commit is contained in:
parent
0a39c4dbbe
commit
144e8337b8
4 changed files with 23 additions and 13 deletions
|
|
@ -45,10 +45,10 @@ def exception_handler(e: werkzeug.exceptions.InternalServerError) -> tuple[str,
|
|||
|
||||
|
||||
@app.route("/")
|
||||
def index() -> str:
|
||||
async def index() -> str:
|
||||
"""Index page."""
|
||||
now = datetime.now()
|
||||
data = get_data(now)
|
||||
data = await get_data(now)
|
||||
|
||||
return flask.render_template("index.html", today=now.date(), **data)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue