Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

flask make static directory

from flask import Flask, send_from_directory

app = Flask(__name__)

@app.route("/static/<path:path>")
def static_dir(path):
    return send_from_directory("static", path)

if __name__ == "__main__":
    app.run()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flask #static #directory
ADD COMMENT
Topic
Name
2+5 =