Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.15] Add construct_search function queryset argument for SearchFilter #574

Merged
merged 1 commit into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rest_framework-stubs/filters.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class SearchFilter(BaseFilterBackend):
search_description: str
def get_search_fields(self, view: APIView, request: Request) -> Incomplete: ...
def get_search_terms(self, request: Request) -> list[str]: ...
def construct_search(self, field_name: str) -> str: ...
def construct_search(self, field_name: str, queryset: QuerySet) -> str: ...
def must_call_distinct(self, queryset: QuerySet, search_fields: Incomplete) -> bool: ...
def to_html(self, request: Request, queryset: QuerySet, view: APIView) -> str: ...

Expand Down
1 change: 0 additions & 1 deletion scripts/stubtest/allowlist_todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ rest_framework.fields.DecimalField.__init__
rest_framework.fields.Field.__class_getitem__
rest_framework.fields.logger
rest_framework.fields.set_value
rest_framework.filters.SearchFilter.construct_search
rest_framework.filters.search_smart_split
rest_framework.generics.GenericAPIView.__class_getitem__
rest_framework.request.Request.__class_getitem__
Expand Down