Rename ExplorablePageFilterSet to GenericPageFilterSet

The main difference is that it has the content_type filter, which means
it's intended for listings that show the generic base Page type.
pull/12324/head
Sage Abdullah 2024-08-13 12:57:12 +01:00 zatwierdzone przez Matt Westcott
rodzic 84ab70d3a1
commit 639586423f
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -114,7 +114,7 @@ class PageFilterSet(WagtailFilterSet):
fields = [] # only needed for filters being generated automatically
class ExplorablePageFilterSet(PageFilterSet):
class GenericPageFilterSet(PageFilterSet):
content_type = MultipleContentTypeFilter(
label=_("Page type"),
queryset=lambda request: get_page_content_types(include_base_page_type=False),
@ -275,7 +275,7 @@ class ExplorableIndexView(IndexView):
index_url_name = "wagtailadmin_explore"
index_results_url_name = "wagtailadmin_explore_results"
page_title = _("Exploring")
filterset_class = ExplorablePageFilterSet
filterset_class = GenericPageFilterSet
@classproperty
def columns(cls):