Creating a base template for the blog
Jinja2's inheritance and include features make it is very easy to define a base template that serves as the architectural foundation for each page on your site. The base template contains basic structural things that should never change, such as the <html>
, <head>,
and <body>
tags, as well as the basic structure of the body. It can also be used to include style sheets or scripts that will be served on every page. Most importantly, the base template is responsible for defining overrideable blocks, into which we will place page-specific content such as the page title and body content.
In order to get up-and-running quickly, we will be using Twitter's Bootstrap library (version 3). This will allow us to focus ...
Get Learning Flask Framework now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.