Opened 6 years ago

Closed 6 years ago

#10980 closed (duplicate)

url tag viewname should be treated as string-or-variable to allow dynamic viewnames

Reported by: jflatow@… Owned by: nobody
Component: Template system Version: 1.0
Severity: Keywords: url tag, dynamic viewnames
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

I think the url tag should allow dynamic viewnames in the following way (dynamic_view_name is a context variable):

{% url dynamic_view_name args,kwargs=values %}

This means existing url tags will now be:

{% url "static_view_name" args,kwargs=values %}

Attachments (1)

url_tag_dynamic_viewnames.patch (1.2 KB) - added by jflatow@… 6 years ago.
Patch to implement described behavior

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by jflatow@…

Patch to implement described behavior

comment:1 Changed 6 years ago by emulbreh

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

See #10745 and #7917.

comment:2 Changed 6 years ago by ubernostrum

  • Resolution set to duplicate
  • Status changed from new to closed

This is a straight-up duplicate of the above-mentioned tickets.

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