【发布时间】:2011-09-17 11:15:20
【问题描述】:
我有这个目录结构:
root:
+pages
-base.html
...
+en
-index.html
...
index.py
...
当我从 index.py 渲染 index.html 时,它说找不到 base.html
这是我在 index.html 中用来扩展 base.html 的标签:
{% extends "../base.html" %}
这是 index.py 中的代码:
path = os.path.join(os.path.dirname(__file__), 'pages/it/index.html')
self.response.out.write(template.render(path, template_values))
哪个是正确的方法?我正在使用 google webapp 和 djagno 模板。
【问题讨论】:
标签: python google-app-engine django-templates