Файл footer.html не включается при расширении файла base.html
В файле header.html у меня есть
<h1>Header Section</h1>
В файле footer.html у меня есть
<h1>Footer Section</h1>
В файле base.html у меня есть
{% include 'header.html'%}
{% block content %}
{% endblock %}
{% include
'footer.html' %}
Но когда я расширяю базовый шаблон, я получаю только заголовок и содержимое страницы, которая расширяет базу. Раздел футера отображается как {% include 'footer.html' %}
Почему?
Don't use multiple lines. The Django template engine can not parse this (properly). Put the entire {% include … %}
[Django-doc] template tag on a single line:
{% include 'header.html'%} {% block content %} {% endblock %} {% include 'footer.html' %}