From the course: Full Stack Web Development with Flask

Unlock this course with a free trial

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

Adding the welcome message to layout

Adding the welcome message to layout - Flask Tutorial

From the course: Full Stack Web Development with Flask

Adding the welcome message to layout

- [Instructor] Adding the welcome message to layout. In this video we'll be adding the welcome user message to the layout. We're going to be modifying the stylesheet as well to format the welcome message. And we'll test the layout to make sure the message is displaying correctly. So let's go and see how this is done in the application. Okay, so let's do that really quick. So that's going to be inside the layout, and we'll do right here maybe below the navigation. And we'll do the same thing. If the session username existed is logged in, then I want to say maybe put a span tag here. We'll put a class called user, we'll do that in a minute, just say "Welcome" and then the name, so the session username, kay? And then close that "if" block, okay endif. Okay, so we have a classical user so let's go to a CSS and just add a CSS here called "user." And I'm going to make it float to the right, so float right. Make it…

Contents