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?

  1. allow
  2. insert
  3. import
  4. 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' %}

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.