Flask 3 · Templates, sessions and config

Render a template

Render templates/index.html with variables. Jinja escapes values by default.

return render_template("index.html", title="Home", posts=posts)

Official Flask 3 documentation

More templates, sessions and config commands

All templates, sessions and config commands · Flask 3 cheatsheet

Was this page helpful?