From f10c5cab58ceb9935403a3cff32a36579c8a68f8 Mon Sep 17 00:00:00 2001 From: Neil Lyons Date: Wed, 27 Feb 2019 11:28:39 +0000 Subject: [PATCH] Update docs for construct_homepage_panels hook (#5109) `construct_homepage_panels` hook doesn't need a return statement. [Looking at the code](https://github.com/wagtail/wagtail/blob/master/wagtail/admin/views/home.py#L101-L102), the user doesn't need to return a list, they need to mutate the list passed in. --- CONTRIBUTORS.rst | 1 + docs/reference/hooks.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 18777c33e..a368bc262 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -349,6 +349,7 @@ Contributors * Thomas Elliott * damianosSemmle * Evan Winter +* Neil Lyons Translators =========== diff --git a/docs/reference/hooks.rst b/docs/reference/hooks.rst index 0f58a808f..dcedcab18 100644 --- a/docs/reference/hooks.rst +++ b/docs/reference/hooks.rst @@ -76,7 +76,7 @@ Hooks for building new areas of the admin interface (alongside pages, images, do @hooks.register('construct_homepage_panels') def add_another_welcome_panel(request, panels): - return panels.append( WelcomePanel() ) + panels.append(WelcomePanel()) .. _construct_homepage_summary_items: