kopia lustrzana https://github.com/wagtail/wagtail
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.pull/5110/head
rodzic
9ae6e9025a
commit
f10c5cab58
|
@ -349,6 +349,7 @@ Contributors
|
|||
* Thomas Elliott
|
||||
* damianosSemmle
|
||||
* Evan Winter
|
||||
* Neil Lyons
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
|
|
@ -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:
|
||||
|
|
Ładowanie…
Reference in New Issue