#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 )
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 , 7 years ago
Description: | modified (diff) |
---|
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 7 years ago
Summary: | Docs outdated after django.db.models.functions introduced → Incorrect ExtractYear imports in Window functions docs |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
Type: | Uncategorized → Bug |
Note:
See TracTickets
for help on using tickets.
In bf49d9eb: