Django Book 翻译
菜单>:
TOC
返回
原文:
You might first consider saving your template somewhere on your filesystem and using Pythons built-in file-opening functionality to read the contents of the template. Heres what that might look like, assuming the template was saved as the file ``/home/djangouser/templates/mytemplate.html`` :
翻译:
你可能首先考虑把模板保存在文件系统的某个位置并用 Python 内建的文件操作函数来读取文件内容。假设文件保存在 ``/home/djangouser/templates/mytemplate.html`` 中的话,代码就会像下面这样:
备注:
译者: