summaryrefslogtreecommitdiff
path: root/docs
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 11:49:51 +0200
commitecf76cc1fb0ca7b02744fb63717cb1ac5f643916 (patch)
treec39f83a6fd06b9784efc9c83b1f174dea8b626f5 /docs
parentc8d3cbdba809285ced3d9ba3cbb63bec422b8e48 (diff)
Clarified type of Window()'s partition_by and order_by arguments.
Diffstat (limited to 'docs')
-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 482aad15d8..64a7136e6e 100644
--- a/docs/ref/models/expressions.txt
+++ b/docs/ref/models/expressions.txt
@@ -782,14 +782,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