﻿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
2901	Enable admin log display to be restricted to a specific site	Christopher Lenz <cmlenz@…>	nobody	"The admin log currently only provides way to show changes across all sites. For a project with multiple sites, it'd be very nice to be able to tell the admin log template tag to only show changes to objects that either aren't associated with any site, or associated with the current (or some other specific) site.

This requires the `django_admin_log` table to be extended with a nullable `site_id` column, which would require appropriate upgrade instructions ala:
{{{
BEGIN;
ALTER TABLE django_admin_log
  ADD site_id integer NULL REFERENCES django_site (id);
COMMIT;
}}}

The patch adds a method called `get_for_obj` to the `SiteManager` class, which attempts to find the site a given object is related with (either through a many-to-many, or a many-to-one relation). This function is reused in the `django.views.defaults.shortcut` function, which needs the same thing."	New feature	new	contrib.admin	newforms-admin	Normal		nfa-someday	cmlenz@…	Accepted	1	0	0	1	0	0
