O'Reilly logo

Learning Flask Framework by Charles Leifer, Matt Copperwaite

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required