Tornado:静态文件配置
2021-05-18 本文已影响0人
飞鹩
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
settings = {
"template_path": os.path.join(BASE_DIR, "html"),
"static_path" : os.path.join(BASE_DIR, "static"),
}
def make_app():
return tornado.web.Application([
(r"/", MainHandler),
],
**settings)
使用图片: