Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#10052 closed (fixed)

Small Aggregation Documentation Update - Import Line

Reported by: Tyler Brownell <tyler@…> Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:

Description

This change request is for the generating aggregates over a queryset section of the aggregation documentation:
http://docs.djangoproject.com/en/dev/topics/db/aggregation/#generating-aggregates-over-a-queryset

Please change the following line of code to include the other methods that are used throughout the page:

from django.db.models import Avg

Should be changed to:

from django.db.models import Avg, Max, Min, Count

This way new Django users, like me, know that these methods have to be imported, and imported from django.db.models before they can be used.

Change History (2)

comment:1 Changed 7 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [9787]) Fixed #10052 -- Added import line for other aggregates used in examples. Thanks to Tyler Brownell <tyler@…> for the suggestion.

comment:2 Changed 6 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top