Skip to Content
Mastering Flask
book

Mastering Flask

by Jack Stouffer
September 2015
Intermediate to advanced
288 pages
5h 30m
English
Packt Publishing
Content preview from Mastering Flask

Chapter 3. Creating Views with Templates

Now that we have our data in an easily accessible format, displaying the information in a web page becomes much easier. In this chapter, we will use the included templating language for Flask Jinja, to dynamically create HTML from our SQLAlchemy models. We will also examine Jinja's methods to automate the creation of HTML and modify data for presentation inside a template. Then, the chapter will end with automatically creating and validating HTML forms with Jinja.

Jinja's syntax

Jinja is a templating language written in Python. A templating language is a simple format that is designed to help automate the creation of documents. In any templating language, variables passed to the template replace predefined ...

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

An Introduction to Flask

An Introduction to Flask

Miguel Grinberg
Flask Blueprints

Flask Blueprints

Joel Perras
Flask By Example

Flask By Example

Gareth Dwyer

Publisher Resources

ISBN: 9781784393656Supplemental Content