Opened 10 years ago

Closed 10 years ago

Last modified 10 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: dev
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:2 by Redouane Zait, 10 years ago

Version: 1.7master

comment:3 by Baptiste Mispelon, 10 years ago

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 by Aymeric Augustin, 10 years ago

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 by Tim Graham, 10 years ago

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

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

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 by Tim Graham <timograham@…>, 10 years ago

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