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 4. Forms and Validation

In this chapter, we will learn how to use forms to modify the content on our blog directly through the site. This will be a fun chapter because we will be adding all sorts of new ways to interact with our site. We will create forms for working with the Entry model, learn how to receive and validate user data, and finally update the values in the database. Form processing and validation will be handled by the popular WTForms library. We will continue building out views and templates to support these new forms, learning a few new Jinja2 tricks along the way.

In this chapter we shall:

  • Install WTForms and create a form for working with the Entry model
  • Write views to validate and process form data, and persist changes to ...

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