0PricingLogin
Flask Academy · Lesson

Define a Base Template with Blocks

Create a layout with overridable block regions.

Layouts Repeat Everywhere

Every page on your site shares the same header, nav, and footer. Copying that HTML into each template is a maintenance trap. A base template fixes it. 🧩

One Skeleton, Many Pages

A base template holds the full HTML skeleton once. Child pages reuse it and only fill in the parts that differ, so shared markup lives in a single file.

All lessons in this course

  1. Define a Base Template with Blocks
  2. Extend the Base in Child Pages
  3. Include Reusable Partials
  4. Macros for Repeated Markup
← Back to Flask Academy