Hi Nick,
This is the downside of using StreamField I'm afraid - there's no way to do reverse lookups, as the data isn't being stored in a regular database relation.
Wagtail doesn't currently support ManyToMany fields either, but you can work around this by defining an intermediate model that links the two page types (which I'd call BookAuthor or BookAuthorship here), and making that an inline child model of Book <
http://docs.wagtail.io/en/v1.3/topics/pages.html#inline-models>:
from modelcluster.fields import ParentalKey
from wagtail.wagtailcore.models import Orderable
class BookAuthorship(Orderable):
page = ParentalKey('myapp.BookPage', related_name='authors')
author = models.ForeignKey('myapp.AuthorPage', related_name='book_authorships')
panels = [
PageChooserPanel('author'),
]
class BookPage(Page):
...
content_panels = Page.content_panels + [
InlinePanel('authors'),
]
To answer your other question - it's not currently possible to restrict PageChooserBlock by page type. We have a pull request to implement that, but it's currently incomplete:
https://github.com/torchbox/wagtail/pull/1531
Cheers,
- Matt