﻿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
22939	admin_static templatetag is not using the staticfiles' storage	generalov	Aymeric Augustin	"I set `STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'` but I noted what admin pages still contains not hashed urls for static. 

It's looks like the `static` templatetag from django/contrib/admin/templatetags/admin_static.py is not uses the staticfiles' storage. It seems there is a bug in the implementation. 

The condition `if apps.is_installed('django.contrib.staticfiles'):` at  https://github.com/django/django/blob/master/django/contrib/admin/templatetags/admin_static.py#L6
is always False and `staticfiles` backend is nether used.

The implementation of `is_installed` method https://github.com/django/django/blob/master/django/apps/registry.py#L205
looks up the application in the self.app_configs. This array is populated consecutively by self.populate method from settings.INSTALLED_APPS.

The default [INSTALLED_APPS](https://github.com/django/django/blob/master/django/conf/project_template/project_name/settings.py#L32) is:

{{{
INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
)
}}} 


The 'django.contrib.auth' is stays before 'django.contrib.staticfiles'. Therefore when, config for 'django.contrib.auth' is populated, then `django.contrib.staticfiles` is not configured yet and it is absend in the self.app_configs. Therefore apps.is_installed('django.contrib.staticfiles') returns False.

The current solution is put django.config.staticfiles before django.confib.auth in the INSTALLED_APPS. But it seems the bug in the logic of method `Apps.is_installed` because it checks not for application is installed but for application is configured.

"	Bug	closed	Core (Other)	1.7-rc-1	Release blocker	fixed	admin_static admin app-loading		Accepted	1	0	0	0	0	0
