diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 25016ba3d..0b6ae69a8 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -7,6 +7,7 @@ Changelog * Fix: Streamfields no longer break on validation error * Fix: Number of validation errors in each tab in the editor is now correctly reported again * Fix: Userbar now opens on devices with both touch and mouse (Josh Barr) + * Fix: ``wagtail.wagtailadmin.wagtail_hooks`` no longer calls ``static`` during app load, so you can use ``ManifestStaticFilesStorage`` without calling ``collectstatic`` command 1.4.1 (17.03.2016) diff --git a/docs/releases/1.4.2.rst b/docs/releases/1.4.2.rst index dc5ae18b7..4bc426d0c 100644 --- a/docs/releases/1.4.2.rst +++ b/docs/releases/1.4.2.rst @@ -16,4 +16,4 @@ Bug fixes * Streamfields no longer break on validation error * Number of validation errors in each tab in the editor is now correctly reported again * Userbar now opens on devices with both touch and mouse (Josh Barr) - + * ``wagtail.wagtailadmin.wagtail_hooks`` no longer calls ``static`` during app load, so you can use ``ManifestStaticFilesStorage`` without calling ``collectstatic`` command diff --git a/wagtail/wagtailadmin/wagtail_hooks.py b/wagtail/wagtailadmin/wagtail_hooks.py index 52049a788..eebf28c15 100644 --- a/wagtail/wagtailadmin/wagtail_hooks.py +++ b/wagtail/wagtailadmin/wagtail_hooks.py @@ -1,3 +1,4 @@ +from django import forms from django.core import urlresolvers from django.contrib.auth.models import Permission from django.utils.translation import ugettext_lazy as _ @@ -10,8 +11,9 @@ from wagtail.wagtailadmin.search import SearchArea class ExplorerMenuItem(MenuItem): - class Media: - js = [static('wagtailadmin/js/explorer-menu.js')] + @property + def media(self): + return forms.Media(js=[static('wagtailadmin/js/explorer-menu.js')]) @hooks.register('register_admin_menu_item')