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

Get Building Web Applications with Flask now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.