diff --git a/README.md b/README.md index a24884c..43746cf 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,13 @@ class MyAPIView(...): You can customize the search behavior by overriding the `_search` method. ```python +from typing import TypeVar + from drf_haystack_search_filter.filters import HaystackSearchFilter +T = TypeVar("T") + + class MyHaystackSearchFilter(HaystackSearchFilter): def _search(self, request: Request, queryset: QuerySet[T], view: APIView, query: str) -> QuerySet[T]: # Customize the search behavior here