Display DataLesson 18Free preview
Add Master Template
This lesson is part of Django · All levels
Summary
A master template is a basic template containing a shared page frame. The other template just uses {% extends %} and fills the content blocks. This avoids repeating the same HTML code.
Key points
- The master template contains a general framework of the page
- Use {% extends 'base.html' %} to inherit
- Fill the block with {% block name %}
- Reducing the duplication of HTML code
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.