I'm new to Django and puzzled. Using Django 1.4. Inside one of my templates, this code works:
{% for element0, element1 in menu.elements %}
<li class='menu_{{ name }}'><a href="{% url users.views.home %}">{{ element0 }}</a></li>
{% endfor %}
... but this code throws a "NoReverseMatch" error:
{% for element0, element1 in menu.elements %}
<li class='menu_{{ name }}'><a href="{% url element1 %}">{{ element0 }}</a></li>
{% endfor %}
... despite the fact that the "element1" variable holds 'users.views.home'. I'm thinking/hoping that the solution to this is really simple... that I've missed something obvious about variable handling inside Django templates?
I've consulted the documentation for the url built-in function to no avail. Any help will be appreciated.