楼主:
catrush (猫儿冲锋)
2020-02-14 20:15:24看一个老外的教学影片,也许是英文不够好漏掉了什么,有人知道问题在哪吗
http://i.imgur.com/3dLNFET.jpg
http://i.imgur.com/t5uGBox.jpg
作者:
s860134 (s860134)
2020-02-14 20:24:00试试把 index.html 换成 templates/index.html
楼主:
catrush (猫儿冲锋)
2020-02-14 20:39:00楼上,仍然失败,另外return test 有结果,的确是找html档的问题
作者: martin77 (martin77) 2020-02-14 20:49:00
venv目录内找不到templates目录要嘛你的app run的file写在最外层. 不然比较结构的作法应该是用application factory搭配blueprint
作者:
s860134 (s860134)
2020-02-14 20:53:00楼上是对的,先吧 index.py 往上搬一层验证吧
作者:
jiyu520 (不要鲫鱼我)
2020-02-15 07:19:00.
作者:
kokolotl (nooooooooooo)
2020-02-15 09:22:00static资料夹可以在app=flask(__name__, static_url_path=ooxx)设好
可以去 Github 搜寻 The-Flask-Mega-Tutorial-zh
作者:
hongyan (Yan)
2020-02-16 16:13:00建议先把官方文件读过至少tutorials吧,至少知道资料夹结构怎么放