Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Of course, there is a difference, and a significant one. Extends extends an existing template, and include adds a piece of the template in the right place.
Let's imagine a situation with a sufficiently large template, where only part of the page needs to be changed. The base template looks something like this
<!-- parent -->
{%block заголовок%}
{%block левый_блок%}
{%block правый_блок%}
{%block тело%}
{%block подвал%}
<!-- chlid -->
{% extends parent %}
{%block левый_блок %}
{%block тело %}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question