blog-python-app icon indicating copy to clipboard operation
blog-python-app copied to clipboard

该框架如何加载静态资源文件?

Open skymaxu opened this issue 9 years ago • 0 comments

文章上面写的加载静态文件如下: templates或者static目录下的资源文件 但是这样加载是不行的,我自己试过: D:\python_wrokplace\app-python\app>python pymintor.py wsgiapp.py [Monitor] Watching directory D:\python_wrokplace\app-python
..... 127.0.0.1 - - [12/Jun/2016 19:23:35] "GET /static/site.css HTTP/1.1" 404 48

html文件都在templates文件加下,后面我使用绝对目录:

这样加载也不行; flask框架中,有url_for()函数;这个框架中如何实现?

skymaxu avatar Jun 13 '16 03:06 skymaxu