Answer the question
In order to leave comments, you need to log in
How can I make a template hierarchy?
in the view.py file I call a file with a template, for example page.html, and already through page.html I connect to the parent template {% extends 'base.html' %} But I don't understand how I can load page.html from another html file, for example header.html
This is necessary so as not to write the header several times, because if I need, for example
, page1.htm to connect header1.html, footer1.html
page2.htm to connect header2.html, footer1.html
page3.htm to connect header1.html, footer2 .html
the only thing I can do is
page1.htm include base1.html
page2.htm include base2.html
page3.htm include base3.html
which is a bunch of extra code
I just started learning django. so can someone explain this to me
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