-
-
Notifications
You must be signed in to change notification settings - Fork 203
Does Quart load Jinja templates asynchronously? #397
Unanswered
jakubsvehla
asked this question in
Q&A
-
Hi! I have looked into the source code and it seems that Jinja templates are loaded from the filesystem synchronously and blocking the async loop (which would kind of defeat the purpose of having an async framework), is that right? If so, is there a way to load the templates asynchronously and not block the loop?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
I haven't looked at the source code of Quart but rendering a template is typically done with await as shown below which suggests that they are loaded asynchronously.
from quart import render_template @app.route("/hello") async def hello(): return await render_template("index.html")
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment