Skip to content

Commit a4e4e8f

Browse files
committed
Tweaks to the QuerySet.order_by docstring
1 parent b62ce94 commit a4e4e8f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

mongoengine/queryset/base.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,13 +1009,15 @@ def all_fields(self):
10091009
return queryset
10101010

10111011
def order_by(self, *keys):
1012-
"""Order the :class:`~mongoengine.queryset.QuerySet` by the keys. The
1013-
order may be specified by prepending each of the keys by a + or a -.
1014-
Ascending order is assumed. If no keys are passed, existing ordering
1015-
is cleared instead.
1012+
"""Order the :class:`~mongoengine.queryset.QuerySet` by the given keys.
1013+
1014+
The order may be specified by prepending each of the keys by a "+" or
1015+
a "-". Ascending order is assumed if there's no prefix.
1016+
1017+
If no keys are passed, existing ordering is cleared instead.
10161018
10171019
:param keys: fields to order the query results by; keys may be
1018-
prefixed with **+** or **-** to determine the ordering direction
1020+
prefixed with "+" or a "-" to determine the ordering direction.
10191021
"""
10201022
queryset = self.clone()
10211023

0 commit comments

Comments
 (0)