A template block names a replaceable section of a Django template. Paired {% block %} and {% endblock %} tags mark the section, allowing child templates to reuse a parent page while changing selected content. section 3.8
A common pattern uses base.html for shared HTML such as the page title and body structure. A child template extends it and overrides only the blocks it needs, keeping repeated markup in one place. section 3.8 section 3.8.1
RiffMates news page
base.html defines title and content blocks. news2.html uses {% extends "base.html" %}, replaces the title with {{ block.super }}: News, and supplies an <h1> plus a loop over news items. Updating the view to render news2.html makes the inherited page available at /news/. section 3.8.1
Naming the closing tag, as in {% endblock content %}, improves readability, especially when blocks are nested. {{ block.super }} preserves the parent block’s content while adding to it. section 3.8.1
Figure 3.4 Page inheritance for component reuse
Page inheritance can be arranged in layers: a base page, optional variations such as navigation, and concrete site pages. section 3.8

