我有这样的目录结构:
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 Web应用和Django模板。