Search
 
SCRIPT & CODE EXAMPLE
 

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()
Comment

PREVIOUS NEXT
Code Example
Python :: create directory in python 
Python :: pythondatetime cheatsheet 
Python :: python print dict new line 
Python :: read text from a pdffile python 
Python :: python reverse string 
Python :: pytorch save model 
Python :: python search string for word 
Python :: dataframe to dictionary without index 
Python :: how to sort list in descending order in python 
Python :: how to use if else to prove a variable even or odd in python 
Python :: remove after and before space python 
Python :: python copy all files in a folder to nother folder 
Python :: create temporary files in python 
Python :: read_csv unnamed zero 
Python :: plotly reverse y axis 
Python :: flask console log 
Python :: where my python modules 
Python :: get n items from dictionary python 
Python :: python remove duplicates from a list 
Python :: django wait for database 
Python :: python udp receive 
Python :: python get dates between two dates 
Python :: logging the terminal output to a file 
Python :: python path filename 
Python :: how to convert input to uppercase in python 
Python :: label encode one column pandas 
Python :: car in programming python 
Python :: python selenium type in input 
Python :: python dedent 
Python :: polyfit python 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =