关于templateNotFound

来源:互联网 发布:esp8266连接单片机 编辑:程序博客网 时间:2024/06/05 04:20

from the flask docs:

flask will look for templates in the templates folder.


意思是flask会在templates目录里面去找模板文件。

下面是基本的目录结构:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
myapp/
  __init__.py
  models.py
  views/
  templates/
  static/
run.py
requirements.txt
templates/
  layout.html
  index.html
  about.html
  profile/
    layout.html
    index.html
  photos.html
  admin/
    layout.html
    index.html
    analytics.html

0 0