Answer the question
In order to leave comments, you need to log in
Flask - working with templates?
I can't figure out how to work with templates. Sketched one pattern. It has a website header (there is a menu and a search bar). And here I ran into a problem. It is necessary that the first template is loaded on the main page, the second template is loaded on the results page. When following a link from a search results page - the third template. But the top should be the same.
At first I thought to transfer html to the main template, which I will generate depending on the url. But then there will be a lot of html in the py code. Or do they do it?
PS: Or is it possible to somehow include, for example, one template in another?
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