Book Image

Building Web Applications with Flask

By : Italo M Campelo Maia, Jack Stouffer, Gareth Dwyer, Italo Maia
Book Image

Building Web Applications with Flask

By: Italo M Campelo Maia, Jack Stouffer, Gareth Dwyer, Italo Maia

Overview of this book

Table of Contents (17 chapters)
Building Web Applications with Flask
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Flask-WTF


Flask uses extensions in order to integrate transparently with third party libraries. WTForms with Flask-WTF is a good example of that as we will soon see. And, by the way, a Flask extension is a piece of code that integrates its configuration, context, and usage with Flask in a predictable way. That means extension usage is pretty similar. Now make sure Flask-WTF is installed in your virtual environment before continuing:

# oh god, so hard... not!
pip flask-wtf

From http://flask-wtf.readthedocs.org/, the project website, we have the following list of features offered by Flask-WTF:

  • Integration with WTForms

  • Secure form with a CSRF token

  • File upload that works with Flask-Uploads

  • Global CSRF protection

  • Recaptcha support

  • Internationalization integration

We'll see the first two features in this chapter while the third will be discussed in Chapter 10, What Now?. The last three features will not be covered in this book. We advise you to explore them as homework.

Integration with WTForms

Flask...