From fb9a876e92c0cbd53a3e30367efcbc05e35b0cdc Mon Sep 17 00:00:00 2001 From: Dave Cranwell Date: Tue, 17 Jun 2014 17:20:22 +0100 Subject: [PATCH] moved set_page_edit_hanlder to edit_handlders.py. Still not happy it's invoked the right way though --- wagtail/wagtailadmin/edit_handlers.py | 4 ++++ wagtail/wagtailadmin/views/pages.py | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wagtail/wagtailadmin/edit_handlers.py b/wagtail/wagtailadmin/edit_handlers.py index d3be76161..b7090ff22 100644 --- a/wagtail/wagtailadmin/edit_handlers.py +++ b/wagtail/wagtailadmin/edit_handlers.py @@ -261,6 +261,10 @@ def extract_panel_definitions_from_model_class(model, exclude=None): return panels +def set_page_edit_handler(page_class, handlers): + page_class.handlers = handlers + + class EditHandler(object): """ Abstract class providing sensible default behaviours for objects implementing diff --git a/wagtail/wagtailadmin/views/pages.py b/wagtail/wagtailadmin/views/pages.py index 15aa81808..67d0e7525 100644 --- a/wagtail/wagtailadmin/views/pages.py +++ b/wagtail/wagtailadmin/views/pages.py @@ -555,10 +555,6 @@ def get_which_page_edit_handler(page_class): return get_default_panels(page_class) -def set_page_edit_handler(page_class, handlers): - page_class.handlers = handlers - - def get_page_edit_handler(page_class): if page_class not in PAGE_EDIT_HANDLERS: PAGE_EDIT_HANDLERS[page_class] = TabbedInterface(get_which_page_edit_handler(page_class))