Django Book 翻译
菜单>:
TOC
返回
原文:
* Generally, the more ``{% block %}`` tags in your base templates, the better. Remember, child templates dont have to define all parent blocks, so you can fill in reasonable defaults in a number of blocks, and then define only the ones you need in the child templates. Its better to have more hooks than fewer hooks.
翻译:
* 一般来说,基础模板中的 ``{% block %}`` 标签越多越好。记住,子模板不必定义父模板中所有的代码块,因此你可以用合理的缺省值对一些代码块进行填充,然后只对子模板所需的代码块进行(重)定义。俗话说,钩子越多越好。
备注:
译者: