From a4e4e8f4409400e63616183bc0dbd34270e4b96b Mon Sep 17 00:00:00 2001 From: Stefan Wojcik Date: Mon, 17 Jun 2019 17:28:41 +0200 Subject: [PATCH] Tweaks to the QuerySet.order_by docstring --- mongoengine/queryset/base.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mongoengine/queryset/base.py b/mongoengine/queryset/base.py index e17c9632..49e154fb 100644 --- a/mongoengine/queryset/base.py +++ b/mongoengine/queryset/base.py @@ -1009,13 +1009,15 @@ class BaseQuerySet(object): return queryset def order_by(self, *keys): - """Order the :class:`~mongoengine.queryset.QuerySet` by the keys. The - order may be specified by prepending each of the keys by a + or a -. - Ascending order is assumed. If no keys are passed, existing ordering - is cleared instead. + """Order the :class:`~mongoengine.queryset.QuerySet` by the given keys. + + The order may be specified by prepending each of the keys by a "+" or + a "-". Ascending order is assumed if there's no prefix. + + If no keys are passed, existing ordering is cleared instead. :param keys: fields to order the query results by; keys may be - prefixed with **+** or **-** to determine the ordering direction + prefixed with "+" or a "-" to determine the ordering direction. """ queryset = self.clone()