def __init__(
self
,
import_name
,
static_url_path
=None,
static_folder
="static",
static_host
=None,
host_matching
=False,
subdomain_matching
=False,
template_folder
="templates",
instance_path
=None,
instance_relative_config
=False,
root_path
=None,
):
import_name flask 程序所在的包(模块),传入的是__name__,决定的是flask在访问静态文件的时候查找包的路径static_path 静态文件访问路径,一般不推荐使用,使用的是static_url_pathstatic_url_path 静态文件访问路径,可以不传static_folder 静态文件存储的文件夹,可以不传,存在默认值template_folder 静态文件,可以不传,存在默认值
转载请注明原文地址: https://lol.8miu.com/read-23984.html