Create a template on the main page

I will mention up front that in Django, it’s the views that are in control of what data is being rendered, not the templates.

If you’re going to render a template, then it’s the responsibility of the view rendering that template to populate the context.

What this means is that if view “X” is rendering template “A”, and template “A” includes template “B”, then view “X” needs to ensure that all data needed for template “B” is in the context that view “X” is using for the render process.

There is no mechanism by which template “B” is going to cause any view to execute to populate the context that it may be looking for.

(This is a lot easier to explain with real code, which is why I’m asking to see code from your project.)