﻿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
15176	History view of AdminSite doesn't take in account user defined queryset	Tetsuya Morimoto	nobody	"I found a bug which does not show history view in AdminSite when I defined a queryset for multi-db.

# see also:[[BR]]
[http://docs.djangoproject.com/en/dev/topics/db/multi-db/#exposing-multiple-databases-in-django-s-admin-interface]

The history_view method of django.contrib.admin.ModelAdmin give a model object to get_object_or_404 as an argument. In that case, normal queryset of the model is used even if user defined custom queryset for the model. It means that the history view isn't showed for multi-db since it define custom queryset.

I made a patch, but I have no idea for making tests code. I only tested after I did some table operation, and I confirmed the history view.

Additionally, you might wonder about the LogEntry(django_admin_log). I think it's no problem since I can handle LogEntry to read/write with db-router."	New feature	closed	contrib.admin	1.2	Normal	fixed	multi-db	info@…	Accepted	1	0	1	0	0	0
