#12906: Should the url template tag accepts a variable?
---------------------------+------------------------------------------------
Reporter: terrex | Owner: nobody
Status: new | Milestone:
Component: Uncategorized | Version: 1.1
Keywords: | Stage: Unreviewed
Has_patch: 1 |
---------------------------+------------------------------------------------
This way, you could use a model to describe the elements of a generated
menu, i. ex., and lets stuff people to set it from django admin; or
whatever:
<li>
{% for entry in menu_entries %}
<a href="{% url entry.view_name %}">{{ entry.description }}</a>
{% endfor %}
</li>
If MenuEntry.view_name is an CharField containing the urlname or path to
view like the first argument to django.core.urlresolvers.resolve().
I'll attach my changes to django.template.defaulttags to support it.
--
Ticket URL: <http://code.djangoproject.com/ticket/12906>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.