From the course: Full Stack Web Development with Flask

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Processing form data and updating the database

Processing form data and updating the database - Flask Tutorial

From the course: Full Stack Web Development with Flask

Processing form data and updating the database

- [Tutor] Processing form data and updating the database. In this video, we're going to do some form validation and processing form data for the database updates and then also we'll be hashing some passwords, using the Werkzeug library, which is a WSGI web application library and it has these two really important functions, one is to hash the passwords and then the other one just to basically decrypt or un-hash it back. So let's go and see how we can implement this. All right, so one thing I want to mention is that I went ahead and modified a few things in here so we don't have to do it. But these are available in the source files so if you look in the models folder file, I added this Werkzeug security library which is part of Flask, if you install Flask it comes with it already. If not, you can install it and we just import the get generate_password_hash and check password_hash, this is to hash it, this is un-hash it. And…

Contents