Skip to Content
Flask By Example
book

Flask By Example

by Gareth Dwyer
March 2016
Intermediate to advanced
276 pages
6h 48m
English
Packt Publishing
Content preview from Flask By Example

Adding user feedback with WTForms

We now have a web application that is largely functional, but still fails to provide the user with helpful feedback, especially when it comes to submitting web forms. Let's look at how to make our application more intuitive by providing feedback when the user succeeds or fails to complete various actions.

To make our life easier, we'll use another Flask add-on, WTForms, which lets us validate inputs by using prespecified patterns or by creating our own. We'll use WTForms to implement all our web forms, namely:

  • The registration form
  • The sign-in form
  • The create table form

Introducing WTForms

You might have noticed that creating the registration form for new users to sign up for our web app was a bit cumbersome. We had ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Flask

Mastering Flask

Jack Stouffer
Flask Blueprints

Flask Blueprints

Joel Perras

Publisher Resources

ISBN: 9781785286933Supplemental Content