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:
parent
ae249f8454
commit
2b5e03a2ac
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user