Django Book 翻译
菜单>:
TOC
返回
原文:
With an include-based strategy, headers and footers are easy. Its the middle ground thats messy. In this example, both pages feature a title ``
My helpful timestamp site
`` but that title cant fit into ``header.html`` because the ``
`` on both pages is different. If we included the ``
`` in the header, wed have to include the ``
`` , which wouldnt allow us to customize it per page. See where this is going?
翻译:
对基于 include 的策略,头部和底部的包含很简单。麻烦的是中间部分。在此范例中,每个页面都有一个 ``
My helpful timestamp site
`` 标题,但是这个标题不能放在 ``header.html`` 中,因为每个页面的 ``
`` 是不同的。如果我们将 ``
`` 包含在头部,我们就不得不包含 ``
`` ,但这样又不允许在每个页面对它进行定制。何去何从呢?
备注:
译者: