mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Added get_indexed_objects method to Page
This commit is contained in:
parent
3d38e7dd1b
commit
9bf6c18726
@ -509,6 +509,11 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed
|
||||
if self.url_path.startswith(root_path):
|
||||
return ('' if current_site.id == id else root_url) + reverse('wagtail_serve', args=(self.url_path[len(root_path):],))
|
||||
|
||||
@classmethod
|
||||
def get_indexed_objects(cls):
|
||||
content_type = ContentType.objects.get_for_model(cls)
|
||||
return super(Page, cls).get_indexed_objects().filter(content_type=content_type)
|
||||
|
||||
@classmethod
|
||||
def search(cls, query_string, show_unpublished=False, search_title_only=False, extra_filters={}, prefetch_related=[], path=None):
|
||||
# Filters
|
||||
|
Loading…
Reference in New Issue
Block a user