Django Book 翻译
菜单>:
TOC
返回
原文:
A classic way of solving this problem is to use *server-side includes* , directives you can embed within your HTML pages to include one Web page inside another. Indeed, Django supports that approach, with the ``{% include %}`` template tag just described. But the preferred way of solving this problem with Django is to use a more elegant strategy called *template inheritance* .
翻译:
解决该问题的传统做法是使用 *服务器端的 includes* ,你可以在 HTML 页面中使用该指令将一个网页嵌入到另一个中。事实上, Django 通过刚才讲述的 ``{% include %}`` 支持了这种方法。但是用 Django 解决此类问题的首选方法是使用更加简洁的策略—— *模板继承* 。
备注:
译者: