I am new to flask framework, what I want to do is very simple but I cant seem to find a solution online which does not use javascript (I dont know any javascript, which is why I want to avoid it for now).
I want to call python function when user presses a button.
Here is HTML button:
<input type="submit" name="A" value="submit_A">
Python code:
@app.route('/submit_a', methods=['POST', 'GET'])
def submit_a():
if request.method == 'POST':
# code to detect button press
# do stuff
return redirect(url_for('upload_page'))
Any help would be appreciated