Ticket #1959 (closed task: fixed)
[twig] URL Handlers
Reported by: | bruno | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | module:admin | Version: | dev |
Severity: | normal | Keywords: | |
Cc: |
Description
Add url handlers amongst all admin page, and avoid any hardcoded link inside twig template files. This handler can also be used on public part, if needed.
See https://docs.djangoproject.com/en/dev/ref/templates/builtins/#url for instance in django
examples :
- {% url 'admin.blog.post' {id:1} %} to retrieve url that enables to edit post id#1
- {% url 'admin.blog.posts' {selected:1} %} to display posts list, filtered on selected posts
nota : a new tag is not necessary, that could be performed through a function, ie. {{ url('admin.blog.post',{id:1}) }}
Change History
comment:2 Changed 12 years ago by Dsls
(In [e8b17b3a7413]) 1st attempt for admin url handler. See #1645, see #1959
comment:3 Changed 11 years ago by Dsls
(In [519de2d7e4fb]) menu items deserve adminurl abstraction too, See #1645, see #1959
Note: See
TracTickets for help on using
tickets.
could be integrated as part of #1645