Browse Source

Fixed #26925 -- Linked aggregation ordering topic from Meta.ordering docs.

Tim Graham 8 years ago
parent
commit
3aaf6cf0f3
2 changed files with 5 additions and 0 deletions
  1. 3 0
      docs/ref/models/options.txt
  2. 2 0
      docs/topics/db/aggregation.txt

+ 3 - 0
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

+ 2 - 0
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()``
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~