<script src="{{ url_for('static', filename='scripts.js') }}"></script>
import flask
app = flask.Flask(__name__)
with app.test_request_context():
print(flask.url_for("static", filename="index.css"))Output/static/index.css
Input Filesstatic/index.css