[Django] #27865: Document use of Manager rather than BaseManager for from_queryset()

25 views
Skip to first unread message

Django

unread,
Feb 21, 2017, 4:53:15 AM2/21/17
to django-...@googlegroups.com
#27865: Document use of Manager rather than BaseManager for from_queryset()
------------------------------------------------+------------------------
Reporter: Jonatas CD | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
Following #26953, document the use of `Manager` rather that `BaseManager`
on 1.9+ to avoid crash with AssertionError.

Currently the example [1] uses `BaseManager` while in the preceding
paragraph is `Manager`.
[1] https://docs.djangoproject.com/en/dev/topics/db/managers/#from-
queryset

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

Django

unread,
Feb 21, 2017, 7:47:18 AM2/21/17
to django-...@googlegroups.com
#27865: Document use of Manager rather than BaseManager for from_queryset()
-------------------------------------+-------------------------------------

Reporter: Jonatas CD | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution:

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

* easy: 1 => 0


Comment:

A `BaseManager` is defined in that example that's different from
`django.db.models.manager.BaseManager`. Does the example not work as
written?

--
Ticket URL: <https://code.djangoproject.com/ticket/27865#comment:1>

Django

unread,
Feb 21, 2017, 8:44:42 AM2/21/17
to django-...@googlegroups.com
#27865: Document use of Manager rather than BaseManager for from_queryset()
-------------------------------------+-------------------------------------

Reporter: Jonatas CD | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution:

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

Comment (by Jonatas CD):

My idea was to keep the example to text - specially after that mentioned
ticket.

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

Django

unread,
Feb 21, 2017, 10:27:22 AM2/21/17
to django-...@googlegroups.com
#27865: Document use of Manager rather than BaseManager for from_queryset()
-------------------------------------+-------------------------------------

Reporter: Jonatas CD | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution:

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

Comment (by Tim Graham):

I'm not sure what you mean by "keep the example to text".
`django.db.models.manager.BaseManager` isn't a documented API, so I don't
see the reason why we'd need a note saying not to use something that's not
documented. Anyway, will you propose a patch?

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

Django

unread,
Feb 21, 2017, 11:04:35 AM2/21/17
to django-...@googlegroups.com
#27865: Document use of Manager rather than BaseManager for from_queryset()
-------------------------------------+-------------------------------------

Reporter: Jonatas CD | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution:

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

Comment (by Jonatas CD):

sure. I'll do it

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

Django

unread,
Feb 21, 2017, 11:04:59 AM2/21/17
to django-...@googlegroups.com
#27865: Document use of Manager rather than BaseManager for from_queryset()
-------------------------------------+-------------------------------------
Reporter: Jonatas CD | Owner: Jonatas
Type: | CD
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jonatas CD):

* owner: nobody => Jonatas CD
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/27865#comment:5>

Django

unread,
Feb 22, 2017, 8:19:47 PM2/22/17
to django-...@googlegroups.com
#27865: Document use of Manager rather than BaseManager for from_queryset()
-------------------------------------+-------------------------------------
Reporter: Jonatas CD | Owner: Jonatas
Type: | CD
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Someday/Maybe

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

* stage: Unreviewed => Someday/Maybe


--
Ticket URL: <https://code.djangoproject.com/ticket/27865#comment:6>

Django

unread,
Mar 10, 2020, 4:13:18 AM3/10/20
to django-...@googlegroups.com
#27865: Document use of Manager rather than BaseManager for from_queryset()
-------------------------------------+-------------------------------------
Reporter: Jonatas CD | Owner: Jonatas
Type: | CD
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* has_patch: 0 => 1
* stage: Someday/Maybe => Ready for checkin


Comment:

[https://github.com/django/django/pull/12543 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/27865#comment:7>

Django

unread,
Mar 10, 2020, 4:14:46 AM3/10/20
to django-...@googlegroups.com
#27865: Document use of Manager rather than BaseManager for from_queryset()
-------------------------------------+-------------------------------------
Reporter: Jonatas CD | Owner: Jonatas
Type: | CD
Cleanup/optimization | 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: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by GitHub <noreply@…>):

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


Comment:

In [changeset:"a2f554249ec07d4643643773a995579f98564ac1" a2f55424]:
{{{
#!CommitTicketReference repository=""
revision="a2f554249ec07d4643643773a995579f98564ac1"
Fixed #27865 -- Adjusted docs example to avoid confusion with
models.BaseManager.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27865#comment:8>

Django

unread,
Mar 10, 2020, 4:18:09 AM3/10/20
to django-...@googlegroups.com
#27865: Document use of Manager rather than BaseManager for from_queryset()
-------------------------------------+-------------------------------------
Reporter: Jonatas CD | Owner: Jonatas
Type: | CD
Cleanup/optimization | 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: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"0f524f56864e8894a8229d16a96582d80c78d939" 0f524f56]:
{{{
#!CommitTicketReference repository=""
revision="0f524f56864e8894a8229d16a96582d80c78d939"
[3.0.x] Fixed #27865 -- Adjusted docs example to avoid confusion with
models.BaseManager.

Backport of a2f554249ec07d4643643773a995579f98564ac1 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27865#comment:9>

Reply all
Reply to author
Forward
0 new messages