Skip to content

Commit

Permalink
Fixed code-block error in docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
carltongibson committed Nov 29, 2023
1 parent 783b592 commit b9ded74
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/guide/tips.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ 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:
dict of fields like so:

.. code-block:: python

# ... ModelViewSet with DjangoFilterBackend in filter_backends ...

filterset_fields = {
"price": ["gt", "exact"],
}
Expand Down

0 comments on commit b9ded74

Please sign in to comment.