[Django] #28815: Docs outdated after django.db.models.functions introduced

1 view
Skip to first unread message

Django

unread,
Nov 17, 2017, 4:36:15 PM11/17/17
to django-...@googlegroups.com
#28815: Docs outdated after django.db.models.functions introduced
-----------------------------------------+------------------------
Reporter: benjaoming | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-----------------------------------------+------------------------
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....

--
Ticket URL: <https://code.djangoproject.com/ticket/28815>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 17, 2017, 4:37:56 PM11/17/17
to django-...@googlegroups.com
#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

unread,
Nov 17, 2017, 5:30:44 PM11/17/17
to django-...@googlegroups.com
#28815: Docs outdated after django.db.models.functions introduced
-------------------------------+--------------------------------------
Reporter: benjaoming | Owner: nobody
Type: Uncategorized | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"bf49d9eb0b33aefc7179d3843fad0cb7df4e7790" bf49d9eb]:
{{{
#!CommitTicketReference repository=""
revision="bf49d9eb0b33aefc7179d3843fad0cb7df4e7790"
Fixed #28815 -- Fixed ExtractYear imports in
docs/ref/models/expressions.txt.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28815#comment:2>

Django

unread,
Nov 17, 2017, 5:31:05 PM11/17/17
to django-...@googlegroups.com
#28815: Docs outdated after django.db.models.functions introduced
-------------------------------+--------------------------------------
Reporter: benjaoming | Owner: nobody
Type: Uncategorized | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"385e06d8c05ad4e5089295a3bafad2b922fd2763" 385e06d]:
{{{
#!CommitTicketReference repository=""
revision="385e06d8c05ad4e5089295a3bafad2b922fd2763"
[2.0.x] Fixed #28815 -- Fixed ExtractYear imports in
docs/ref/models/expressions.txt.

Backport of bf49d9eb0b33aefc7179d3843fad0cb7df4e7790 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28815#comment:3>

Django

unread,
Nov 17, 2017, 5:32:30 PM11/17/17
to django-...@googlegroups.com
#28815: Incorrect ExtractYear imports in Window functions docs
-------------------------------------+-------------------------------------
Reporter: benjaoming | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* type: Uncategorized => Bug
* stage: Unreviewed => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/28815#comment:4>

Reply all
Reply to author
Forward
0 new messages