[Django] #26836: Allow applications to register links in the admin interface

7 views
Skip to first unread message

Django

unread,
Jul 4, 2016, 8:17:38 AM7/4/16
to django-...@googlegroups.com
#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 | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
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>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 5, 2016, 11:33:36 AM7/5/16
to django-...@googlegroups.com
#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

unread,
Jul 7, 2016, 4:14:45 PM7/7/16
to django-...@googlegroups.com
#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: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Accepted


Comment:

I'm open to exploring this. Before writing a lot of code, it would be a
good idea to submit the proposal to the DevelopersMailingList to get
feedback from others and nail down the design. See #18665 for some related
ideas.

--
Ticket URL: <https://code.djangoproject.com/ticket/26836#comment:2>

Django

unread,
Sep 27, 2016, 11:09:34 PM9/27/16
to django-...@googlegroups.com
#26836: Allow applications to register links in the admin interface
-------------------------------------+-------------------------------------
Reporter: Mathieu Poussin | Owner: Luis Del
| Giudice
Type: New feature | Status: assigned
Component: contrib.admin | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Luis Del Giudice):

* owner: nobody => Luis Del Giudice
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/26836#comment:3>

Django

unread,
Aug 24, 2023, 10:49:28 PM8/24/23
to django-...@googlegroups.com
#26836: Allow applications to register links in the admin interface
---------------------------------+------------------------------------
Reporter: Mathieu Poussin | Owner: smark-1

Type: New feature | Status: assigned
Component: contrib.admin | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by smark-1):

* owner: nobody => smark-1


* status: new => assigned

Django

unread,
Aug 25, 2023, 3:33:52 PM8/25/23
to django-...@googlegroups.com
#26836: Allow applications to register links in the admin interface
---------------------------------+------------------------------------
Reporter: Mathieu Poussin | Owner: smark-1
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by smark-1):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/17200 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/26836#comment:4>

Django

unread,
Sep 7, 2023, 11:53:05 PM9/7/23
to django-...@googlegroups.com
#26836: Allow applications to register links in the admin interface
---------------------------------+--------------------------------------
Reporter: Mathieu Poussin | Owner: Shlomo
Type: New feature | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: wontfix
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 Mariusz Felisiak):

* status: assigned => closed
* has_patch: 1 => 0
* resolution: => wontfix
* stage: Accepted => Unreviewed


Comment:

Closing per [https://groups.google.com/g/django-developers/c/s2Sy8gXu5LM
discussion].

--
Ticket URL: <https://code.djangoproject.com/ticket/26836#comment:5>

Reply all
Reply to author
Forward
0 new messages