Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#28815 closed Bug (fixed)

Incorrect ExtractYear imports in Window functions docs

Reported by: benjaoming Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by benjaoming)

Documentation has the wrong location of ExtractYear:

https://docs.djangoproject.com/en/2.0/ref/models/expressions/#window-functions

Example:

>>> from django.db.models import Avg, ExtractYear, F, Window
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    from django.db.models import Avg, ExtractYear, F, Window
ImportError: cannot import name 'ExtractYear'

Should these functions be available from django.db.models? The module already contains quite a heavy load of imports....

References:

django.db.models.functions.datetime created in:
https://github.com/django/django/commit/77b73e79a4750dcbfabc528bf00cad81ff5bb4d9

Window expression PR:
https://github.com/django/django/pull/7611/files

Change History (4)

comment:1 by benjaoming, 6 years ago

Description: modified (diff)

comment:2 by Tim Graham <timograham@…>, 6 years ago

Resolution: fixed
Status: newclosed

In bf49d9eb:

Fixed #28815 -- Fixed ExtractYear imports in docs/ref/models/expressions.txt.

comment:3 by Tim Graham <timograham@…>, 6 years ago

In 385e06d:

[2.0.x] Fixed #28815 -- Fixed ExtractYear imports in docs/ref/models/expressions.txt.

Backport of bf49d9eb0b33aefc7179d3843fad0cb7df4e7790 from master

comment:4 by Tim Graham, 6 years ago

Summary: Docs outdated after django.db.models.functions introducedIncorrect ExtractYear imports in Window functions docs
Triage Stage: UnreviewedReady for checkin
Type: UncategorizedBug
Note: See TracTickets for help on using tickets.
Back to Top