擅长:python、mysql、java
<p>一次只能扩展一个模板。对于其他内容,请使用<a href="http://jinja.pocoo.org/docs/templates/#import" rel="nofollow">macros</a>或<a href="http://jinja.pocoo.org/docs/templates/#include" rel="nofollow">include statements</a>。你知道吗</p>
<p>对于您的列表,使用<code>{% include %}</code>只是一张罚单:</p>
<pre><code>{% extends "template.html" %}
{% block content %}
<h2>The Links</h2>
<ul>
{% include "filewithlinks.html">
</ul>
{% endblock %}
</code></pre>