Django Book 翻译
菜单>:
TOC
返回
原文:
Its simplest to use absolute paths (i.e., directory paths that start at the root of the filesystem). If you want to be a bit more flexible and decoupled, though, you can take advantage of the fact that Django settings files are just Python code by constructing the contents of ``TEMPLATE_DIRS`` dynamically, for example:
翻译:
最省事的方式是使用绝对路径(即从文件系统根目录开始的目录路径)。如果想要更灵活一点并减少一些负面干扰,可利用 Django 配置文件就是 Python 代码这一点来动态构建 ``TEMPLATE_DIRS`` 的内容,如:
备注:
译者: