Pass Dynamic Value to Django url built-in
问题 Within a view, I am maintaining a dictionary containing some data I would like to display in an <a> in a template with the Django url built-in. my_view.py links = [ { 'name': 'link 1', 'pattern': 'fe:upload' }, { 'name': 'link 2', 'pattern': 'fe:download' } ] It will work hardcoded like this: <a href="{% url 'fe:upload' id %}">up</a> <a href="{% url 'fe:download' id %}">down</a> However I'm struggling to put it into a loop my_template.html <ul> {% for link in links %} <li> <a href='{% url