﻿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
36538	Addition of `AdminSite.media` for adding JS and CSS files globally to every admin page	Michał Pokusa		"I propose adding the property `media` to `AdminSite` class, with similar functionality as `ModelAdmin.media`. The main reason for it is making it easy to add any JS/CSS globally for every admin page, and it will make the media management more consistent across the admin.

While it is possible to do that now by extending one of the base templates and manually adding the script or link tag, the main benefit will be the ability to separate this from the templates completely and in future, maybe moving all hard-coded media html tags to `AdminSite.media` thus making the template cleaner and making it possible to take advantage of `Media` merging logic.

Instalation of packages that add custom styles or scripts would be simplified, and be as easy as inheriting from a admin site mixin:

{{{#!python
class CustomAdminSite(PackageMixin, AdminSite)
    ...
}}}

Implementation would require adding the `AdminSite.media` property and small modification to the `admin/base.html` template.

If this issue is accepted, I would be happy to take on it.
 "	New feature	closed	contrib.admin	dev	Normal	wontfix	admin adminsite media script style global	Michał Pokusa	Unreviewed	0	0	0	0	0	0
