@@ -2,9 +2,9 @@ Filtering
22=========
33
44Graphene integrates with
5- `django-filter <https://django-filter.readthedocs.org >`__ to provide
5+ `django-filter <https://django-filter.readthedocs.io/en/1.1.0/ >`__ (< 2.0.0) to provide
66filtering of results. See the `usage
7- documentation <https://django-filter.readthedocs.io/en/latest /guide/usage.html#the-filter> `__
7+ documentation <https://django-filter.readthedocs.io/en/1.1.0 /guide/usage.html#the-filter> `__
88for details on the format for ``filter_fields ``.
99
1010This filtering is automatically available when implementing a ``relay.Node ``.
@@ -15,7 +15,7 @@ You will need to install it manually, which can be done as follows:
1515.. code :: bash
1616
1717 # You'll need to django-filter
18- pip install django-filter
18+ pip install django-filter==1.1.0
1919
2020 Note: The techniques below are demoed in the `cookbook example
2121app <https://github.com/graphql-python/graphene-django/tree/master/examples/cookbook> `__.
@@ -26,7 +26,7 @@ Filterable fields
2626The ``filter_fields `` parameter is used to specify the fields which can
2727be filtered upon. The value specified here is passed directly to
2828``django-filter ``, so see the `filtering
29- documentation <https://django-filter.readthedocs.io/en/latest /guide/usage.html#the-filter> `__
29+ documentation <https://django-filter.readthedocs.io/en/1.1.0 /guide/usage.html#the-filter> `__
3030for full details on the range of options available.
3131
3232For example:
@@ -127,7 +127,7 @@ create your own ``Filterset`` as follows:
127127 all_animals = DjangoFilterConnectionField(AnimalNode,
128128 filterset_class = AnimalFilter)
129129
130- The context argument is passed on as the `request argument <http://django-filter.readthedocs.io/en/latest /guide/usage.html#request-based-filtering >`__
130+ The context argument is passed on as the `request argument <http://django-filter.readthedocs.io/en/1.1.0 /guide/usage.html#request-based-filtering >`__
131131in a ``django_filters.FilterSet `` instance. You can use this to customize your
132132filters to be context-dependent. We could modify the ``AnimalFilter `` above to
133133pre-filter animals owned by the authenticated user (set in ``context.user ``).
0 commit comments