默认的静态目录是static,flask提供静态文本文件访问的代码如下:
@app.route('/robots.txt') def robotstxt(): return send_from_directory(app.static_folder, 'robots.txt')