假设我有这个结构:
{# base.html #}
{% block content %}{% endblock %}
{# page.html #}
{% extends "base.html" %}
{% block content %}
{% include "snippet.html" %}
{# and I also want somehow to redefine {% block snippet_content %} of snippet here #}
{% endblock %}
{# snippet.html #}
<bells_and_whistles>
{% block snippet_content %}{% endblock %}
</bells_and_whistles>
我希望代码是不言自明的。
有没有一种优雅的方式来实现这一目标?