From the course: Full Stack Web Development with Flask

Unlock this course with a free trial

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

Creating child templates

Creating child templates

- Creating child templates. In this video, we're going to create a couple more child templates. We created a base template in the previous video and also a child template for the index file. Now, let's go ahead and create three more for our login, the register and the classes template. So let's go and do that right now. So here in Visual Studio Code, I have the index file which is the child template of the base template co-layout, and the layout file created is self.content() here. I want to delete this one here. I don't want to show this twice again, just want to show you earlier that that's how it was done. If you want to display more than two times all the content in the same template, so usually you cannot do this by using a block content this way. So let's say that, okay, we'll leave the index -- the footer as is; if you want, you can, you know, port it back here, that's okay, but I'll just leave it as is for now. And…

Contents