O'Reilly logo

Mastering Flask by Jack Stouffer

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

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

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