Django Book 翻译
菜单>:
TOC
返回
原文:
You might wonder how, if ``TEMPLATE_DIRS`` was empty by default, Django found the default admin templates. The answer is that, by default, Django automatically looks for templates within a ``templates/`` subdirectory in each application package as a fallback. See the Writing Custom Template Loaders in Chapter 10 for more information about how this works.
翻译:
你可能会想到是这么一回事,如果 ``TEMPLATE_DIRS`` 缺省是空的,Django就使用缺省的管理 模板。正确的回答是,缺省情况下,Django自动在每个app里的 ``templates/`` 子目录里搜索 模板来做后备。具体请看第十章中的编写自定义模板加载器章节。
备注:
译者: