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 login route to interact with database - Flask Tutorial
From the course: Full Stack Web Development with Flask
Updating login route to interact with database
- [Instructor] Updating login route to interact with database. In this video, we're going to perform some form validation, we're going to validate the email addresses, and we're going to learn to hash passwords using the Werkzeug library, which is a WSGI web application library. Now the Werkzeug library has two functions. One is to hash a password by calling the generate_password_hash, and to unhash it, we just call the check_password_hash. So let's go and see how these are done. Okay, so now let's do the form processing part. Okay, now we have to consider about the hashing keywords. Right now, it's not hashed yet. So, we log in, we can still validate that using just the regular password. So, instead of saying, this is a fake email, I'm going to grab this directly from the database. Okay, so let's just say that we're going to modify this and let's see, instead of saying this, I'm going to grab the data from the actual form…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Installation and configuration9m 16s
-
(Locked)
Creating the login and registration pages7m 10s
-
(Locked)
Updating the login route and login template9m 54s
-
(Locked)
Flashing messages9m 59s
-
(Locked)
Displaying form validation error messages4m 36s
-
(Locked)
Processing form data and updating the database6m 45s
-
(Locked)
Updating login route to interact with database6m 46s
-
(Locked)
Updating registration route to interact with database8m 20s
-
(Locked)
Creating the courses page6m 2s
-
(Locked)
Creating the enrollment page8m 58s
-
(Locked)
Updating the enrollment template4m 13s
-
(Locked)
Creating the MongoDB aggregation pipeline9m 56s
-
(Locked)
Adding the aggregation pipeline to application5m 9s
-
(Locked)
Creating sessions and authentication5m 23s
-
(Locked)
Setting up the session for logout and enrollment routes3m 12s
-
(Locked)
Updating the navigation and testing the session3m 57s
-
(Locked)
Adding the welcome message to layout3m 24s
-
-