flask中访问静态资源。
# static_folder :指定静态文件夹的目录名,这个目录是基于__name__的同一级目录。(默认就是static)
# static_url_path: 指定访问静态文件夹的前缀url,(默认是/static)
app = Flask(__name__, static_folder="static", static_url_path="/resource")
# 浏览器中访问static/imgs/1.png的url为:127.0.0.1:5000/resource/imgs/1.png
标签:__,文件,静态,访问,static,url,png
From: https://www.cnblogs.com/juelian/p/17742117.html