I'm building up menus in django, and wanted a construct like this:

{% for item in menu %}
<a href="{% url item.view%}">{{item.label}}</a>

but that doesn't work, because there's no view "item.view"

so point 1, looks like a shortcoming in the syntax of the URL tag.
With most tags, an unquoted item gets looked up, and a quoted item is
used as-is. Here, there's no way to look up the first argument to URL.

Second item, I seem to remember there being an older/stable URL
reverse-lookup function exposed to us from some module, but I can't
find a reference to it/docs at the moment! Or am I confused, and
should just import the template tag, use that in my code?

thanks for help!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to