Skip to content

Commit 9d35b76

Browse files
committed
Remove order_by in docs
1 parent 9216772 commit 9d35b76

File tree

2 files changed

+1
-40
lines changed

2 files changed

+1
-40
lines changed

docs/filtering.rst

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -91,50 +91,13 @@ Which you could query as follows:
9191
}
9292
}
9393
94-
Orderable fields
95-
----------------
96-
97-
Ordering can also be specified using ``filter_order_by``. Like
98-
``filter_fields``, this value is also passed directly to
99-
``django-filter`` as the ``order_by`` field. For full details see the
100-
`order\_by
101-
documentation <https://django-filter.readthedocs.org/en/latest/usage.html#ordering-using-order-by>`__.
102-
103-
For example:
104-
105-
.. code:: python
106-
107-
class AnimalNode(DjangoObjectType):
108-
class Meta:
109-
model = Animal
110-
filter_fields = ['name', 'genus', 'is_domesticated']
111-
# Either a tuple/list of fields upon which ordering is allowed, or
112-
# True to allow filtering on all fields specified in filter_fields
113-
filter_order_by = True
114-
interfaces = (relay.Node, )
115-
116-
You can then control the ordering via the ``orderBy`` argument:
117-
118-
.. code::
119-
120-
query {
121-
allAnimals(orderBy: "name") {
122-
edges {
123-
node {
124-
id,
125-
name
126-
}
127-
}
128-
}
129-
}
130-
13194
Custom Filtersets
13295
-----------------
13396

13497
By default Graphene provides easy access to the most commonly used
13598
features of ``django-filter``. This is done by transparently creating a
13699
``django_filters.FilterSet`` class for you and passing in the values for
137-
``filter_fields`` and ``filter_order_by``.
100+
``filter_fields``.
138101

139102
However, you may find this to be insufficient. In these cases you can
140103
create your own ``Filterset`` as follows:

docs/tutorial.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ Create ``cookbook/ingredients/schema.py`` and type the following:
9898
class Meta:
9999
model = Category
100100
filter_fields = ['name', 'ingredients']
101-
filter_order_by = ['name']
102101
interfaces = (relay.Node, )
103102
104103
@@ -112,7 +111,6 @@ Create ``cookbook/ingredients/schema.py`` and type the following:
112111
'category': ['exact'],
113112
'category__name': ['exact'],
114113
}
115-
filter_order_by = ['name', 'category__name']
116114
interfaces = (relay.Node, )
117115
118116

0 commit comments

Comments
 (0)