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.

Creating the homepage

Creating the homepage

- [Instructor] Creating the home page. In this video, we're going to create a template to store our home page, the landing page of our application. We'll call it the index.html, and also we'll be importing or calling the render_template function from the Flask module to render these templates to the browser. We'll be using the Jinja template expression to create code blocks and set our templates, and also, we're using in the include directory of to include any external files, so let's go into the code and see how this is done, so here in the application, we have the main.py file. This is the main entry point. Configuration is still here. In the application folder we have the __init__.py, and then here we have imported the routing from the routes.py. Okay, so when we run the application, it renders this text to the browser, and that's what we saw in the other video, so now, instead of having to put the text here…

Contents