﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35520	ModelAdmin uses incorrect database in change and delete views	Jake Howard	Jake Howard	"In `ModelAdmin.delete_view` and `ModelAdmin.changelist_view`, the transaction is hardcoded to use `db_for_write`, even if the request is read-only (eg `GET`). This potentially results in the wrong database being selected (or errors if `db_for_write` is used to prevent writing to models).

I propose modifying these calls to use `db_for_read` if the request is read-only (`request.method in (""GET"", ""HEAD"", ""OPTIONS"", ""TRACE"")`). Most users won't notice the difference, as the same database will be selected. But those who are using a custom router will get the database they expect."	Bug	closed	contrib.admin	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
