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

Chapter 3. Templates and Views

This chapter could alternatively be titled The Flask Chapter, because we will cover two of the most recognizable components of the framework: the Jinja2 template language, and the URL routing framework. Up to this point, we have been laying the foundation for the blog app, but we have barely scratched the surface of actual Flask development. In this chapter, we will dive into Flask and see our app finally start taking shape. We will turn our drab database models into dynamically rendered HTML pages, using templates. We will come up with a URL scheme that reflects the ways we wish to organize our blog entries. As we progress through the chapter, our blog app will start looking like a proper website.

In this chapter ...

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