﻿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
23497	Admin System Checks do not run for custom AdminSite sites	Andrew Mosson	Andrew Mosson	"The admin section of the System checks only runs for ModelAdmin subclasses that are registered with the main AdminSite (admin.site.register(...))

To replicate place something similar to the following in a urls.py file


{{{
books/admin.py
from django.contrib import admin

class BookAdmin(admin.ModelAdmin):
    list_display = 'a field'  # intentional error

- urls.py
from django.admin.sites import AdminSite
from books.models import Book
from books.admin import BookAdmin

custom_site = AdminSite()
custom_site.register(Book, BookAdmin)

> python manage.py check
Expect to see an error here (specifically that list display must be a list of a tuple)
}}}

In actuality, this runs fine.

One potential fix for this problem would be to create a module level variable in django.contrib.admin.sites (or directly in django.contrib.admin), run the checks on register (this is already being done but the result of the checks are being ignored), and store the results in the module level variable.

Patch with this approach is attached"	Bug	closed	Core (System checks)	1.7	Normal	fixed			Accepted	1	0	0	0	0	0
