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 the login route and login template

Updating the login route and login template - Flask Tutorial

From the course: Full Stack Web Development with Flask

Updating the login route and login template

- [Instructor] Updating Login Route and Login Template. In this video, we're going to update the login route to capture form data and update the login template using the WTF, or WTForms library. And it will look something like the following template, as you can see here. So let's go into the IDE and see how this is done. But for now, let's go and then go in to the routes. We need to update these routings to modify or change that as well. So the first thing is the login form here. This login, as you can see, we are going to pass the form object to the login form here. So to do that we need to include here in the login route to include the methods of GET and POST. Remember we did that last time, We need both of those so we can process data, needs to accept both the POST and the GET. And then the login here, we are going to create a variable called "form". You can call it whatever you want, usually form is typical, and this…

Contents