【问题标题】:Mix of Inheritance + Inclusion tags继承+包含标签的混合
【发布时间】:2010-11-21 09:17:52
【问题描述】:

我们知道“扩展”继承标签和包含标签。组合起来怎么样,比如asp.net网格模板。

像这样:

{% template %}
   {% content top %}some html{% endcontent %}
   {% content bottom %}some html{% endcontent %}
{% endtemplate %}

更新: 是否已经开发了这样的标签?

【问题讨论】:

  • 这样的标签已经开发了吗?

标签: django django-templates


【解决方案1】:

目前,您不能在基本模板中混合覆盖来自 {% include %}{% block %} 标记。

如果#6646 被提交,您将能够做到这一点(至少对于静态{% include %} 标签)。

【讨论】:

    【解决方案2】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-30
    • 2011-12-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多