Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You can change /static/ to something else:
app = Flask(__name__, static_url_path='/js_and_css')
from flask import send_from_directory
@app.route('/css/<filename>')
def css_folder(filename):
return send_from_directory('css', filename)
@app.route('/js/<filename>')
def js_folder(filename):
return send_from_directory('js', filename)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question