我的文件夹结构看起来像
└── templates
├── base.html
├── foo
│ ├── 1.html
│ ├── 2.html
└── bar
├── 1.html
└── 2.html
如何使用base.html扩展1.html,2.html? “ ../”在模板内不起作用
{% extends "../base.html" %}
env = Environment(loader=FileSystemLoader('templates/%s/' % (channel == 0 and 'foo' or 'bar')))
templ = templateId + '.html'
templ = env.get_template(templ)
output = templ.render(data=data)
我得到{TemplateNotFound} ../ base.html