From faabc18ce7d72233de67144b25b294d19d20532f Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Mon, 20 Jul 2015 13:17:17 +0100 Subject: [PATCH] Docs for multiple page types in PageChooserPanel --- docs/reference/pages/editing_api.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/reference/pages/editing_api.rst b/docs/reference/pages/editing_api.rst index 6401d3b7df..c413cb66ff 100644 --- a/docs/reference/pages/editing_api.rst +++ b/docs/reference/pages/editing_api.rst @@ -163,10 +163,15 @@ PageChooserPanel ) content_panels = Page.content_panels + [ - PageChooserPanel('related_page', 'demo.PublisherPage'), + PageChooserPanel('related_page', ['demo.PublisherPage', 'demo.EventPage']), ] - ``PageChooserPanel`` takes two arguments: a field name and an optional page type. Specifying a page type (in the form of an ``"appname.modelname"`` string) will filter the chooser to display only pages of that type. + ``PageChooserPanel`` takes two arguments: a field name and an optional page type. + + The page type parameter restricts which page types can be selected in this field. It defaults to the model that the ``ForeignKey`` is pointing at (in this case, ``wagtailcore.Page``). + + This paramater will take a model class, a string (in the form of an ``"appname.modelname"`` string) or a list of strings/model classes. + ImageChooserPanel -----------------