Answer the question
In order to leave comments, you need to log in
How to make a master page?
How to make a master page? Those. a page that will serve as a container for all views in the project. (declare a header, footer, etc. there) As far as I know, you can use the include tag for partial view, but I don’t quite understand how to render the desired view ... For example:
master.html
<header></header>
<div class="content">
{% include "index.html" %}
</div>
<footer></footer>
def index(request):
render(request, 'master.html');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question