I have html template, and python function(driver_links), my functional work but I have the wrong link
html template (driver_id.html):
<a href="{{ url_for('driver_links', driver_id=key[0]) }}">{{key[0]}}</a>
function:
@app.route("/report/drivers/<driver_id>")
def driver_links(driver_id):
context = {
"report": sort_asc_desc('data', 'asc'),
"test": driver_id
}
return render_template('driver_id.html', **context)
wrong link I have: http://127.0.0.1:5000/report/drivers/SVF
if I change @app.route in function(driver_links) to:
@app.route("/report/drivers/")
I get a correct link, but function doesn't work
example correct link: http://127.0.0.1:5000/report/drivers/?driver_id=SVF