在进入example 文件夹然后 run app ,打开网页的时候报错,
把template print 出来发现 找nav.html 为什么是找bootstrap文件夹而不是找templates文件夹?,在 app 那边设置了templates 也是不行?
{% from ‘bootstrap/nav.html’ import render_nav_item %}
File “C:\python\lib\site-packages\flask\templating.py”, line 59, in get_source
return self._get_source_fast(environment, template)
File “C:\python\lib\site-packages\flask\templating.py”, line 96, in _get_source_fast
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: bootstrap/nav.html
127.0.0.1 - - [08/Jul/2021 17:20:02] “GET / HTTP/1.1” 500 -
(myflask) C:\Users\12150185\python\myflask\bootstrap\examples>cd…
(myflask) C:\Users\12150185\python\myflask\bootstrap>cd…
(myflask) C:\Users\12150185\python\myflask>