源码如下
class Flask(object):
def __init__(self, package_name):
if self.static_path is not None:
self.url_map.add(Rule(self.static_path +'/<filename>',
build_only=True, endpoint='static'))
if pkg_resources is not None:
target = (self.package_name, 'static')
else:
target = os.path.join(self.root_path, 'static')
self.wsgi_app = SharedDataMiddleware(self.wsgi_app, {
self.static_path: target
})
看了werkzeug这部分的文档,还是没有理解意思,可以解释一下吗?谢谢:-)
杨魅力
森栏
qq_花开花谢_0
相关分类