💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
# `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*](#)