From the course: Full Stack Web Development with Flask

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Updating registration route to interact with database

Updating registration route to interact with database - Flask Tutorial

From the course: Full Stack Web Development with Flask

Updating registration route to interact with database

- [Instructor] Updating registration route to interact with database. In this video, we're going to do form validation. We're going to hash password using the Werkzeug library. And we're going to insert data into the database, and finally we're going to verify in the database to see these data are actually inserted using the Compass interface. So let's go and see how these are done. Okay so let's go and then implement this registration part here. By using the hashing as well. And this should be very very simple, just like before. And we need to include up here, the methods of GET and POST. And GET here, doesn't matter the order, doesn't matter. And then we need to get a form from the RegisterForm. And so when we get that, we process the form, we need to validate that, so if form.validate_on_submit. Again if that's true. Okay so when we process that form, it's going to go into the form here and run this form, and it's…

Contents