diff options
| author | Tim Graham <timograham@gmail.com> | 2016-07-25 06:21:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-25 06:21:39 -0400 |
| commit | 3aaf6cf0f3288986c4ce56defea26420f8a48534 (patch) | |
| tree | 09aac50d8ee68323e23f59a8dca52090e2b29102 | |
| parent | 348cfccd9072f0e08ffe4cfb3946d1dc6a629e86 (diff) | |
Fixed #26925 -- Linked aggregation ordering topic from Meta.ordering docs.
| -rw-r--r-- | docs/ref/models/options.txt | 3 | ||||
| -rw-r--r-- | docs/topics/db/aggregation.txt | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index 91f684bd8e..6569c774e8 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -300,6 +300,9 @@ Django quotes column and table names behind the scenes. ordering = ['-pub_date', 'author'] + Default ordering also affects :ref:`aggregation queries + <aggregation-ordering-interaction>`. + .. warning:: Ordering is not a free operation. Each field you add to the ordering diff --git a/docs/topics/db/aggregation.txt b/docs/topics/db/aggregation.txt index 47563338d6..aa56a8b4eb 100644 --- a/docs/topics/db/aggregation.txt +++ b/docs/topics/db/aggregation.txt @@ -479,6 +479,8 @@ will be automatically added to the result set. However, if the ``values()`` clause is applied after the ``annotate()`` clause, you need to explicitly include the aggregate column. +.. _aggregation-ordering-interaction: + Interaction with default ordering or ``order_by()`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
