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 ...
Get Flask By Example 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.