#26836: Allow applications to register links in the admin interface
-------------------------------+--------------------------------------
Reporter: kedare | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by kedare):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> I think it would be interesting for custom applications to register links
> in various places in the admin area.
>
> The typical example would be the admindocs module, instead of hardcoding
> it in the admin template, we could have something like
>
> {{{
> #!python
> admin.register_link(title=_('Documentation'), url=reverse('...')
> location='header_right', staff_only=True))
> }}}
>
> And a specific code in the template like :
>
> {{{
> {% for link in admin.links.header_right %}
> <a href="{{ link.url }}">{{ link.title }}</a>
> {% endfor %}
> }}}
>
> We could also add other locations (Like a new pane in the admin
> frontpage, etc.)
>
> So any application could easily add its own links.
>
> Currently, as far I a know, the only way to do this is to override the
> admin templates.
New description:
I think it would be interesting for custom applications to register links
in various places in the admin area.
The typical example would be the admindocs module, instead of hardcoding
it in the admin template, we could have something like
{{{
#!python
admin.register_link(title=_('Documentation'), url=reverse('...'),
location='header_right', staff_only=True))
}}}
And a specific code in the template like :
{{{
{% for link in admin.links.header_right %}
<a href="{{ link.url }}">{{ link.title }}</a>
{% endfor %}
}}}
We could also add other locations (Like a new pane in the admin frontpage,
etc.)
So any application could easily add its own links.
Currently, as far I a know, the only way to do this is to override the
admin templates.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/26836#comment:1>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.27aa2be4038f877ec11b8ff7d91fb0d7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.