Skip to Content
Flask Framework Cookbook - Second Edition
book

Flask Framework Cookbook - Second Edition

by Shalabh Aggarwal
July 2019
Beginner to intermediate
302 pages
9h 38m
English
Packt Publishing
Content preview from Flask Framework Cookbook - Second Edition

How it works...

In the preceding template structure, there is an inheritance pattern being followed. The base.html file acts as the base template for all other templates. The home.html file inherits from base.html, and product.html inherits from home.html. In product.html, the container block is overwritten, which was first populated in home.html. When this app is run, we should see output similar to that shown in the following screenshot:

The preceding screenshot shows how the home page will look. Note the URL in the browser. The product page should appear as follows:

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Writing a Web Application with Flask

Writing a Web Application with Flask

Doug Farrell
Mastering Flask

Mastering Flask

Jack Stouffer

Publisher Resources

ISBN: 9781789951295Supplemental Content