Opened 6 years ago

Closed 6 years ago

#11510 closed (invalid)

Import path for aggregates is incorrect

Reported by: admackin 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 6 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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