找不到 jinja2 模板 - 未解决 [英] jinja2 template not found - unsolved

查看:56
本文介绍了找不到 jinja2 模板 - 未解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误:

Exception has occurred: TemplateNotFound

我已经阅读了许多问题的答案,这些问题的症状似乎与我的相似,但没有一个对我有用.例如,我已经将 html 文件放入模板文件夹中.

I have read dozens of answers to questions whose symptoms appear to match mine, but none of them worked for me. For example, I already have the html files placed into a templates folder.

推荐答案

必须更改模板文件夹的路径以包含包含它的文件夹.

Must change the path to templates folder to include the folders that contain it.

file_loader = FileSystemLoader('Tools\\CustomMikraotGedolot\\templates',

代替

file_loader = FileSystemLoader('templates',

这篇关于找不到 jinja2 模板 - 未解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆