Opened 8 years ago

Closed 5 years ago

Last modified 5 years ago

#27865 closed Cleanup/optimization (fixed)

Document use of Manager rather than BaseManager for from_queryset()

Reported by: Jonatas CD Owned by: Jonatas CD
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: no UI/UX: no

Description

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

Change History (9)

comment:1 by Tim Graham, 8 years ago

Easy pickings: unset

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

comment:2 by Jonatas CD, 8 years ago

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

comment:3 by Tim Graham, 8 years ago

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?

comment:4 by Jonatas CD, 8 years ago

sure. I'll do it

comment:5 by Jonatas CD, 8 years ago

Owner: changed from nobody to Jonatas CD
Status: newassigned

comment:6 by Tim Graham, 8 years ago

Triage Stage: UnreviewedSomeday/Maybe

comment:7 by Carlton Gibson, 5 years ago

Has patch: set
Triage Stage: Someday/MaybeReady for checkin

comment:8 by GitHub <noreply@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In a2f55424:

Fixed #27865 -- Adjusted docs example to avoid confusion with models.BaseManager.

comment:9 by Carlton Gibson <carlton.gibson@…>, 5 years ago

In 0f524f56:

[3.0.x] Fixed #27865 -- Adjusted docs example to avoid confusion with models.BaseManager.

Backport of a2f554249ec07d4643643773a995579f98564ac1 from master

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