Flask 3 · Templates, sessions and config
Share a layout
Define blocks in a base template and fill them in child templates.
{# child.html #}
{% extends "base.html" %}
{% block content %}
<h1>Hello</h1>
{% endblock %}
Official Flask 3 documentation
More templates, sessions and config commands
- Render a template
- Loop in a template
- Link to a static file
- Remember a user between requests
- Load configuration
- Show a one-time message
All templates, sessions and config commands · Flask 3 cheatsheet