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.

URL variables

URL variables

- [Instructor] URL variables. In this video, we're going to to take a look at the routing patterns, creating a URL variable, setting default data to a URL variable, and how you pass this data to a template. Let's dive into the code and take a look. So here on the application, I'm going to open this application folder and look in the templates here. So, well, let's just see. I'm going to go and run this application first. So, press Control, back, tick. And then, make sure you are in the virtual environment. Activate. Okay, let's run it. Flask, run. All right, I'm going to go to the browser. And refresh this browser. So that's what we get. Okay, so first, let's talk about this URL variables. Now what that is, is basically let's just say, that when you go to the index page, or the classes page, or the courses page and you can pass some data to this page here through a variable. So on the URL, instead of saying…

Contents