How can I efficiently get specific children?
If I understand correctly from reading the source code, the following runs a query per page:
def specific_child_pages(self):
all_pages = self.get_children().live().filter(show_in_menus=True)
specific_pages = [page.specific for page in all_pages]
return specific_pages
Is it possible to get specific pages for all children but only run one query per page type instead of each page?
------------------------------------------------------------
If not, maybe there is a more efficient way to accomplish the following:
------------------------------------------------------------
I am trying to create a generic index page that can display a thumbnail of the content if the page defines one. Ideally, the poster file could be stored on the base page model, but since the page model isn't swappable I don't think this is supported? Is there any way to accomplish this without needing the specific page?