Django include 标签
Include
include
标记可以使当前模板中包含模板。
当您的内容块在许多页面上都相同时,这时就非常有用了。
实例
footer.html:
<p>You have reach the bottom of this page, thank you for your time.</p>
testing_tags.html:
<h2>Hello</h2>
<p>This page contains a footer in a template.</p>
{% include 'footer.html' %}
结果
Hello
This page contains a footer in a template.
You have reach the bottom of this page, thank you for your time.