作者:
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吧,至少知道資料夾結構怎麼放