liveBook · Manning

Base template

A base template is a template defining shared structure and named sections that other templates inherit and supply or override.

How 2 Manning books explain it

Go in Practice, Second Edition

A base template is a template containing shared markup and references to sections supplied or overridden by extending templates.

How it is used
Reuses shared HTML markup across pages while allowing page-specific sections.
How deep it goes
Shows required template definitions, optional blocks, and Go setup for separate page template sets.
Examples
Uses a shared HTML layout, a user page, and a page overriding styles.
What you can do after
Build it from scratch using html/template definitions and blocks for reusable page layouts.

Read how Go in Practice, Second Edition explains base template →

Django in Action

A parent template is a template whose structure and blocks are inherited by another template.

How it is used
Centralizes shared page structure so Django site pages reuse boilerplate while customizing named regions.
How deep it goes
Defines blocks, extends, block.super, file placement, view changes, and browser verification without descending into template-engine internals.
Examples
Uses RiffMates base.html and news2.html, including title, content, block.super, an h1, and a rendered news list.
What you can do after
Apply it via Django templates to build child pages that inherit shared structure and selectively override or extend blocks.

Read how Django in Action explains base template →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.