I'm trying to create a little job board, each job card is dynamically inserted from flask from a list (for now, will be an SQL DB later)
When the user clicks the button View Task I want it to go to another page where it displays the task/job in more detail.
What I want attached to that button is the job/task ID.
This is how I'd want/expect the button to function
{% for task in available_tasks %}
<div>
<a href="{{ url_for('view_task', task_id={{ task['id'] }}) }}">View Task</a>
</div>
{% endfor %}
This could then be pasted into a route that would take the ID as an argument and fetch the full job/task information.
app.route('/view_task/<task_id>')
def view_task(task_id):
task_data = task_database[taskid]
return render_template('detailed_view.html', task_info=task_data)
My problem is href="url_for('view_task', task_id={{ task['id'] }})" doesn't work, is there a way to do this?

href="url_for('view_task', task_id={{ task['id'] }})"it doesn't recognize the arguement. I could dotask_id='1'doesnt seem to like the jinja {{ }}href="..."value was a bit off, not containing an actual URL.