From c41af1fd8cc1833c6e871cb4f03fadc3819902d2 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Fri, 11 Nov 2016 12:07:16 +0000 Subject: [PATCH] Hardcode the module path wagtail.wagtailcore.models.PageManager in system check message The use of Manager.from_queryset means that __module__ / __name__ don't work reliably, resulting in a misleading message - see https://groups.google.com/d/msg/wagtail/6vZExngYVu4/vQBecOckAwAJ --- wagtail/wagtailcore/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wagtail/wagtailcore/models.py b/wagtail/wagtailcore/models.py index 5b0843d2c..112c2474d 100644 --- a/wagtail/wagtailcore/models.py +++ b/wagtail/wagtailcore/models.py @@ -566,8 +566,7 @@ class Page(six.with_metaclass(PageBase, AbstractPage, index.Indexed, Clusterable errors.append( checks.Error( "Manager does not inherit from PageManager", - hint="Ensure that custom Page managers inherit from {}.{}".format( - PageManager.__module__, PageManager.__name__), + hint="Ensure that custom Page managers inherit from wagtail.wagtailcore.models.PageManager", obj=cls, id='wagtailcore.E002', )