Django Book 翻译
菜单>:
TOC
返回
原文:
If a loader is able to successfully load a template, it should return a tuple: ``(template_source, template_path)`` . Here, ``template_source`` is the template string that will be compiled by the template engine, and ``template_path`` is the path the template was loaded from. That path might be shown to the user for debugging purposes, so it should quickly identify where the template was loaded from.
翻译:
如果加载器能够成功加载一个模板, 它应当返回一个元组: ``(template_source, template_path)`` 。在这里的 ``template_source`` 就是将被模板引擎编译的的模板字符串,而 ``template_path`` 是被加载的模板的路径。由于那个路径可能会出于调试目的显示给用户,因此它应当很快的指明模板从哪里加载而来。
备注:
译者: