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 navigation and testing the session

Updating the navigation and testing the session - Flask Tutorial

From the course: Full Stack Web Development with Flask

Updating the navigation and testing the session

- [Instructor] Updating the navigation and testing the session. In this video, we're going to configure the navigation to use sessions, and we're going to test the sessions to make sure they work throughout the application. So let go see how this is done. Now, let's do one more thing. We're going to go into our navigation, in here as well, so when we sign in, we don't want to show the register link, nor do we want to show the login link, right? We want to hide the register if you are signed in, so here, I'm going to issue an if block. Say, if the session, username, if that is true, then we don't want to show. That means so if it's not true, right, if not. Then we show register, only that time. Endif. Okay? And then down here also, I'm going to copy this, because we want to show the login logout, right? So again, let me copy this up here, just paste it right here. If it's not signed in, then login, else, show…

Contents