How to pass to a Python file a Boolean variable whose value depends on which of two buttons is pressed in a webpage

Hi,
first of all I must admit that I am a true beginner with Python, and even more with its relationship with webpages, so I apologize if my question will be trivial or unclear. Obviously I am available to provide any further details that may be necessary.
I “inherited” an HTML template based on Flask and containing two buttons, the first of which refers to the report.py file, and the second to qreport.py:

<a href="{{ url_for('report', rowData=test_id) }}"><button style="background-color:green; border-color:blue; color:white"; class="btn"><i class="fa fa-download"></i> Download Report</button></a>

<a href="{{ url_for('qreport', rowData=test_id) }}"><button class="btn"><i class="fa fa-download"></i> Download QReport</button></a>

(Example of instantiated version:

<a href="/report/report/3576"><button style="background-color:green; border-color:blue; color:white"; class="btn"><i class="fa fa-download"></i> Download Report</button></a>

<a href="/qreport/qreport/3576"><button class="btn"><i class="fa fa-download"></i> Download QReport</button></a>)

Routing is handled in the home.py file:

@app.route("/report/report/<rowData>")
def report(rowData):
rep_file_name = rep.generate(rowData)
return send_file(rep_file_name, as_attachment=True, cache_timeout=0)

@app.route("/qreport/qreport/<rowData>")
def qreport(rowData):
qrep_file_name = qrep.generate(rowData)
return send_file(qrep_file_name, as_attachment=True, cache_timeout=0)

I want the code to point to report.py in both cases, but passing it a Boolean variable whose value depends on which button has been clicked, and which I intend to use as a condition in one or more if statements to generate both kinds of reports in the same Python file.
What should I do?
Thanks in advance!
Alessia