Oct-06-2020, 01:01 AM
I would like to insert the data from two "zipped" lists into a hyperlink. In the following code, the DATA list is what I want the user to see in the link and the NUMBER list is the variable that I would like to pass to a new route. I've tried for hours but can't seem to get the syntax right on this. Does anyone know what is wrong with this code:
{% for data, number in zip %} <p><a href="{{ url_for('view_post', number={{number}}') }}">> {{data}}</a></p> {% endfor %}Thanks!