torchbox/wagtail — pull request #185 by kaedroho (2014-04-07 08:49:54+00:00)
Title: Page QuerySet

This pull request adds a queryset to the page class which can be accessed using the ".query" attribute. This doesn't add any new functionality, its just a bit of syntatic sugar.

Some examples...

Select all live blog posts:

Page.query.descendant_of(blog_index).type(BlogEntry).live()

Select pages in a particular tree but not in a subtree of that tree

Page.query.descendant_of(event_index).not_descendant_of(past_events).live()