summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Sanders <shang.xiao.sanders@gmail.com>2021-08-04 01:48:02 +1000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-09-10 12:27:55 +0200
commita7be74d01775f862d18add17b10296c8583e35d8 (patch)
treeca307cff6be2476e922a78e22af225eed0447020
parent54684a3ec03725f605461f4460da550550e34a00 (diff)
[3.2.x] Clarified type of Window()'s partition_by and order_by arguments.
Backport of ecf76cc1fb0ca7b02744fb63717cb1ac5f643916 from main
-rw-r--r--docs/ref/models/expressions.txt11
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt
index 9ab502d244..236918380e 100644
--- a/docs/ref/models/expressions.txt
+++ b/docs/ref/models/expressions.txt
@@ -757,14 +757,15 @@ The ``expression`` argument is either a :ref:`window function
<window-functions>`, an :ref:`aggregate function <aggregation-functions>`, or
an expression that's compatible in a window clause.
-The ``partition_by`` argument is a list of expressions (column names should be
-wrapped in an ``F``-object) that control the partitioning of the rows.
-Partitioning narrows which rows are used to compute the result set.
+The ``partition_by`` argument accepts an expression or a sequence of
+expressions (column names should be wrapped in an ``F``-object) that control
+the partitioning of the rows. Partitioning narrows which rows are used to
+compute the result set.
The ``output_field`` is specified either as an argument or by the expression.
-The ``order_by`` argument accepts a sequence of expressions on which you can
-call :meth:`~django.db.models.Expression.asc` and
+The ``order_by`` argument accepts an expression or a sequence of expressions on
+which you can call :meth:`~django.db.models.Expression.asc` and
:meth:`~django.db.models.Expression.desc`. The ordering controls the order in
which the expression is applied. For example, if you sum over the rows in a
partition, the first result is the value of the first row, the second is the