#28815: Docs outdated after django.db.models.functions introduced
-------------------------------+--------------------------------------
Reporter: benjaoming | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by benjaoming:
Old 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....
New 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....
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
--
--
Ticket URL: <https://code.djangoproject.com/ticket/28815#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.74e51326224497e28dc707d7b57769ca%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.