Django Tutorial · Django Syntax

Django Include

Learn all about Django Include in this comprehensive tutorial.

5 min read intermediate
  • The include tag allows you to include a template inside the current template.
  • You can send variables into the template by using the with keyword.

Include

The include tag allows you to include a template inside the current template.

This is useful when you have a block of content that is the same for many pages.

Variables in Include

You can send variables into the template by using the with keyword.

In the include file, you refer to the variables by using the {{ variablename }} syntax: