From a323cf7c0a33d7ffd395a6805019f613fb79f985 Mon Sep 17 00:00:00 2001 From: Uchenna Adubasim <76544543+journpy@users.noreply.github.com> Date: Thu, 9 Oct 2025 05:27:01 +0100 Subject: [PATCH] improved docs/api-guide/filtering.md for better understanding (#9795) --- docs/api-guide/filtering.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-guide/filtering.md b/docs/api-guide/filtering.md index 6c80dc754..d36d4ce95 100644 --- a/docs/api-guide/filtering.md +++ b/docs/api-guide/filtering.md @@ -235,7 +235,7 @@ For example: search_fields = ['=username', '=email'] -By default, the search parameter is named `'search'`, but this may be overridden with the `SEARCH_PARAM` setting. +By default, the search parameter is named `'search'`, but this may be overridden with the `SEARCH_PARAM` setting in the `REST_FRAMEWORK` configuration. To dynamically change search fields based on request content, it's possible to subclass the `SearchFilter` and override the `get_search_fields()` function. For example, the following subclass will only search on `title` if the query parameter `title_only` is in the request: @@ -257,7 +257,7 @@ The `OrderingFilter` class supports simple query parameter controlled ordering o ![Ordering Filter](../img/ordering-filter.png) -By default, the query parameter is named `'ordering'`, but this may be overridden with the `ORDERING_PARAM` setting. +By default, the query parameter is named `'ordering'`, but this may be overridden with the `ORDERING_PARAM` setting in the `REST_FRAMEWORK` configuration. For example, to order users by username: