0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 03:31:04 +01:00

Deprecate Page.search()

This commit is contained in:
Karl Hobley 2015-07-06 15:45:02 +01:00
parent ae249f8454
commit 2b5e03a2ac

View File

@ -637,6 +637,12 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed
@classmethod
def search(cls, query_string, show_unpublished=False, search_title_only=False, extra_filters={}, prefetch_related=[], path=None):
# This is deprecated use Page.objects.search() instead
warnings.warn(
"The Page.search() method is deprecated. "
"Please use the Page.objects.search() method instead.",
RemovedInWagtail13Warning, stacklevel=2)
# Filters
filters = extra_filters.copy()
if not show_unpublished: