Opened 7 years ago

Last modified 7 years ago

#28815 closed Bug

Docs outdated after django.db.models.functions introduced — at Initial Version

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

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....

Change History (0)

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