diff --git a/docs/guide/tips.txt b/docs/guide/tips.txt index 5b514ad3..2067b2c0 100644 --- a/docs/guide/tips.txt +++ b/docs/guide/tips.txt @@ -37,6 +37,16 @@ would be: class ProductFilter(django_filters.FilterSet): price__gt = django_filters.NumberFilter(field_name='price', lookup_expr='gt') + +When using ``filterset_fields``, you can also add the ``lookup_expr`` in the +dict of fields like so: + +.. code-block:: python + # ... ModelViewSet with DjangoFilterBackend in filter_backends ... + + filterset_fields = { + "price": ["gt", "exact"], + } Missing ``lookup_expr`` for text search filters