![Flask Framework Cookbook(Second Edition)](https://wfqqreader-1252317822.image.myqcloud.com/cover/513/36698513/b_36698513.jpg)
上QQ阅读APP看书,第一时间看更新
Implementing block composition and layout inheritance
Usually, any web application will have a number of web pages that are different to each other. However, code blocks such as headers and footers will appear the same on almost all pages throughout the site; likewise, the menu will remain the same. In fact, it is usually just the center container block that changes. For this, Jinja2 provides a great way of ensuring inheritance among templates.
With this in mind, it's good practice to have a base template where the basic layout of the site, along with the header and footer, can be structured.