@@ -2,9 +2,9 @@ Filtering
2
2
=========
3
3
4
4
Graphene 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
6
6
filtering 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> `__
8
8
for details on the format for ``filter_fields ``.
9
9
10
10
This 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:
15
15
.. code :: bash
16
16
17
17
# You'll need to django-filter
18
- pip install django-filter
18
+ pip install django-filter==1.1.0
19
19
20
20
Note: The techniques below are demoed in the `cookbook example
21
21
app <https://github.com/graphql-python/graphene-django/tree/master/examples/cookbook> `__.
@@ -26,7 +26,7 @@ Filterable fields
26
26
The ``filter_fields `` parameter is used to specify the fields which can
27
27
be filtered upon. The value specified here is passed directly to
28
28
``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> `__
30
30
for full details on the range of options available.
31
31
32
32
For example:
@@ -127,7 +127,7 @@ create your own ``Filterset`` as follows:
127
127
all_animals = DjangoFilterConnectionField(AnimalNode,
128
128
filterset_class = AnimalFilter)
129
129
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 >`__
131
131
in a ``django_filters.FilterSet `` instance. You can use this to customize your
132
132
filters to be context-dependent. We could modify the ``AnimalFilter `` above to
133
133
pre-filter animals owned by the authenticated user (set in ``context.user ``).
0 commit comments