I have a HTML page with a button. This web page is running on Flask. What I want to do is when the user press a button, I want to invoke Python method.
main.py
from flask import url_for, Flask, render_template
app = Flask(__name__)
@app.route('/')
def hello_world():
return render_template('tour.html')
if __name__ == '__main__':
app.run(debug=True)
def first():
global todayDate
parseWemake(*Wemake.wemakeData())
parseCoupang(*Coupang.coupangData())
parseTmon(*Tmon.tmonData())
tour.html
<button>Click</button>
I am now lost here. All I want to do is invoke first() method on click that button on html.
Thanks in advance.