问题描述
/Backend
app.py
/Frontend
/pages
/templates
template1.html
/others
404.html
home.html
app = Flask(__name__,template_folder="../Frontend/pages/")
@app.route('/')
def default():
return render_template("others/home.html")
和home.html包括:
{% extends '../templates/template1.html' %}
错误消息如下:
jinja2.exceptions.TemplateNotFound: ../templates/template1.html
所以问题应该出在home.html引用不正确的template1.html,对吗?
我觉得我尝试了一切,甚至将template1.html放在与home.html相同的文件夹中,但这没用。
你知道这是怎么回事吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)