Code

Opened 6 years ago

Closed 6 years ago

#6144 closed (duplicate)

URL template tag does not support dynamic named URLs via the template context

Reported by: glimmer <glimmer@…> Owned by: nobody
Component: Template system Version: master
Severity: Keywords: named urls url template tag dynamic
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

As it stands today the {% url %} template tag does not support dynamic named URLs passed in the variables in the template context. I'm proposing that the URL tag to support {% url context_var args %} syntax, with the context_var being a named URL pattern. In my opinion it would greatly improve on DRY principles for the {% url %} template tag.

Attachments (1)

dynamic-url-tag.diff (804 bytes) - added by glimmer <glimmer@…> 6 years ago.
Initial implementation (my first django patch, so be gentle) :)

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by glimmer <glimmer@…>

Initial implementation (my first django patch, so be gentle) :)

comment:1 Changed 6 years ago by Øyvind Saltvik <oyvind@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #3769

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.