Add a comment to describe why _filtered_by_child_of exists

pull/6417/head
Karl Hobley 2020-09-29 15:21:43 +01:00 zatwierdzone przez Karl Hobley
rodzic a88866c3c6
commit 2d9f81f3bb
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -154,6 +154,10 @@ class ChildOfFilter(BaseFilterBackend):
raise BadRequestError("parent page doesn't exist")
queryset = queryset.child_of(parent_page)
# Save the parent page on the queryset. This is required for the page
# explorer, which needs to pass the parent page into
# `construct_explorer_page_queryset` hook functions
queryset._filtered_by_child_of = parent_page
return queryset