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

All templates, sessions and config commands · Flask 3 cheatsheet

Was this page helpful?