#32618: Aggregation documentation should mention conditional aggregation
--------------------------------------+------------------------------------
     Reporter:  Simon Willison        |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Documentation         |                  Version:  3.2
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  1                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

 * needs_docs:  1 => 0
 * type:  Bug => Cleanup/optimization
 * easy:  0 => 1
 * stage:  Unreviewed => Accepted


Comment:

 There is also an example in the
 [https://docs.djangoproject.com/en/3.1/topics/db/aggregation/#cheat-sheet
 Cheat sheet]. A small reference should be enough, e.g.
 {{{
 diff --git a/docs/topics/db/aggregation.txt
 b/docs/topics/db/aggregation.txt
 index cc6310052a..2e882e2a1a 100644
 --- a/docs/topics/db/aggregation.txt
 +++ b/docs/topics/db/aggregation.txt
 @@ -354,7 +354,7 @@ authors with a count of highly rated books::
      >>> Author.objects.annotate(num_books=Count('book'),
 highly_rated_books=highly_rated)

  Each ``Author`` in the result set will have the ``num_books`` and
 -``highly_rated_books`` attributes.
 +``highly_rated_books`` attributes. See also :ref:`conditional-
 aggregation`.

  .. admonition:: Choosing between ``filter`` and ``QuerySet.filter()``
 }}}

 What do you think?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32618#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.4b5f2dd3156c9dc662eb56ed6c69a8bd%40djangoproject.com.

Reply via email to