﻿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
21395	Admin widget JS files currently make <img> paths using admin_static_prefix	rclmenezes@…	nobody	"Currently, some admin widgets create images dynamically in JS, requiring paths to files like icon-calendar.gif or selector-search.gif. Django currently accomplishes this by giving the template admin_static_prefix. Javascript then appends /img/image_path to the static prefix to create <img> tags.

This is problematic to developers who change STATICFILES_STORAGE to something like s3Boto. Some of these storage solutions require signatures or credentials to be passed as URL params for the files to be loaded.

One solution is to pass file paths for these files as parameters to DateTimeShortcuts.js and SelectFilter.js.

The admin static prefix is given to the admin base template here:
https://github.com/django/django/blob/master/django/contrib/admin/templates/admin/base.html#L9

And the admin media prefix is given to SelectFilter here:
https://github.com/django/django/blob/master/django/contrib/admin/widgets.py#L48

SelectFilter can be given the path to icon-unknown.gif instead of it being generated here:
https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/SelectFilter2.js

And functions like addClock in DateTimeShortcuts.js can be given the path to icon-unknown.gif directly here:
https://github.com/django/django/blob/master/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js#L118

etc."	Bug	closed	contrib.admin	dev	Normal	duplicate			Accepted	0	0	0	0	0	0
