Home »
Python »
Django MCQs
Which Django tag is used to include a template inside the current template?
27. Which Django tag is used to include a template inside the current template?
- allow
- insert
- import
- include
Answer: D) include
Explanation:
The Django tag include is used to include a template inside the current template. Consider the below-given example in which we are importing a templated named "students.html" inside the current template –
{% include 'students.html' %}