Opened 9 years ago

Closed 9 years ago

#12906 closed (wontfix)

Should the url template tag accepts a variable?

Reported by: Guillermo Gutiérrez Owned by: nobody
Component: Uncategorized Version: 1.1
Severity: Keywords:
Cc: xiterrex@…, campus-virtual-fueca-django@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


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:

{% for entry in menu_entries %}
<a href="{% url entry.view_name %}">{{ entry.description }}</a>
{% endfor %}

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.

Attachments (1)

allow_variable_in_url_templatetag.diff (1.6 KB) - added by Guillermo Gutiérrez 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by Guillermo Gutiérrez

comment:1 Changed 9 years ago by Guillermo Gutiérrez

I'd meant staff users not stuff people.

comment:2 Changed 9 years ago by Russell Keith-Magee

Resolution: wontfix
Status: newclosed

Closing wontfix, or rather "Can't fix". This would be a backwards incompatible change - or at the very least, an amiguous change (since we're moving towards using quotes to describe constants.

Note: See TracTickets for help on using tickets.
Back to Top