Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#23898 closed Bug (fixed)

django.contrib.admin.actions.delete_selected missing admin_site.each_context

Reported by: Redouane Zait Owned by: nobody
Component: contrib.admin Version: master
Severity: Normal Keywords: delete_selected action, each_context, site_title, site_header, site_url
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Hello,
in django's delete_selected action (django.contrib.admin.actions.delete_selected)
the templates are rendered without admin_site's each_context, and thus
it always renders the default values for admin_site.each_context() key attributes (site_title, site_header, site_url)
So if you override/use custom values for site_title, site_header, site_url they will not be used on the delete_selected action view.

Change History (7)

comment:1 Changed 6 years ago by Redouane Zait

comment:2 Changed 6 years ago by Redouane Zait

Version: 1.7master

comment:3 Changed 6 years ago by Baptiste Mispelon

Has patch: set
Needs tests: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

Hi,

The pull request looks good but it's missing some tests.

Thanks!

comment:4 Changed 6 years ago by Aymeric Augustin

Can you use the same style as other views in django/contrib/admin/options.py?

While you're there it would be nice to support extra_context too (#12044).

comment:5 Changed 6 years ago by Tim Graham

Needs tests: unset
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:6 Changed 6 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 8e7b384d89db67e450aef1f2eb9a12703a5942e9:

Fixed #23898 -- Added missing context to admin's deleted_selected view.

Thanks Redouane Zait for the report.

comment:7 Changed 6 years ago by Tim Graham <timograham@…>

In f671905fdb678eb9fc3763d94bfe560b2d9d0b40:

[1.7.x] Fixed #23898 -- Added missing context to admin's deleted_selected view.

Backport of 8e7b384d89db67e450aef1f2eb9a12703a5942e9 from master

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