html include js file flask
<script type="text/javascript"
src="{{ url_for('static', filename='map.js') }}"></script>
html include js file flask
<script type="text/javascript"
src="{{ url_for('static', filename='map.js') }}"></script>
call javascript function flask
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def upload_file():
if request.method == 'POST':
#verify if the file is valid
#here invoke js to do something (for example flash("test"))
return render_template('upload.html', flash_message="True")
return render_template('upload.html', flash_message="False")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us