合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
# `parent` When a template uses inheritance, it's possible to render the contents of theparent block when overriding a block by using the `parent` function: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2 3 4 5 6 7</pre></div></td><td class="code"><div class="highlight"><pre>{% extends "base.html" %} {% block sidebar %} &lt;h3&gt;Table Of Contents&lt;/h3&gt; ... {{ parent() }} {% endblock %} </pre></div></td></tr></table> The `parent()` call will return the content of the `sidebar` block asdefined in the `base.html` template. See also [*extends*](#), [*block*](#), [*block*](#)