Flask raises TemplateNotFound error even though template file exists

前端 未结 11 1383
别跟我提以往
别跟我提以往 2020-11-21 23:02

I am trying to render the file home.html. The file exists in my project, but I keep getting jinja2.exceptions.TemplateNotFound: home.html when I t

11条回答
  •  醉话见心
    2020-11-21 23:26

    My problem was that the file I was referencing from inside my home.html was a .j2 instead of a .html, and when I changed it back jinja could read it.

    Stupid error but it might help someone.

提交回复
热议问题