I am trying to make the following template snippet work:
<ul>
{% for name,label in entries.items %}
<li><a href="{% url name %}">{{ label }}</a></li>
{% endfor %}
</ul>
As you can see name is a variable that I need to expand into string before passing it to the url built-in tag.
Unfortunately the aforementioned template snippet results in the following exception:
Exception Type: TemplateSyntaxError
Exception Value:
Caught NoReverseMatch while rendering: Reverse for 'name' with arguments '()' and keyword arguments '{}' not found.
Any ideas or alternative methods on how to achieve this?