Opened 7 years ago

Closed 7 years ago

#11510 closed (invalid)

Import path for aggregates is incorrect

Reported by: Andy MacKinlay Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


All the samples for aggregates at show the import path as

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

This results in an ImportError. It should be changed to the correct path:

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

Change History (1)

comment:1 Changed 7 years ago by Russell Keith-Magee

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: invalid
Status: newclosed

The aggregates are imported into the db.models namespace on line 9 of django/db/models/

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