Every line of 'flask send from directory' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
268 @app.route("/hotspot-static/") 269 def send_static(path): 270 """ serve static files during devel (deployed with nginx+uwsgi) """ 271 return flask.send_from_directory(os.getenv("STATIC_DIR", "/var/www/static"), path)
18 @blueprint.route('/') 19 def serve(path): 20 if path != "" and os.path.exists("src/client/" + path): 21 return send_from_directory('src/client', path) 22 else: 23 return send_from_directory('src/client', 'index.html')
23 @bp.route("/static/") 24 def serve_static(path): 25 return send_from_directory("static", path)
152 @app.route("/", defaults={"path": ""}) 153 @app.route("/") 154 def root(path): # pylint: disable=unused-variable 155 """Responds to all other non-static paths with index.html. 156 157 Args: 158 path: Unused path. 159 160 Returns: 161 The landing page html text. 162 """ 163 del path 164 return send_from_directory(FLAGS.static_path, "index.html")
11 def send_static_file(filename): 12 return send_from_directory(static_folder, filename)
27 @site.route('/flask-maple/') 28 def flask_maple(path): 29 return send_from_directory( 30 ph.join(site.static_folder, 'flask-maple'), path)