def index():
    return render_template('template.html')

@app.route('/my-link/')
def my_link():
    print('I got clicked!')
return 'Click.'
if __name__ == '__main__':
    app.run(debug=True)
Call a python function within a html file