#35392: aprefetch_related_objects cannot be imported from django.db.models
-------------------------------------+-------------------------------------
Reporter: James | Owner: nobody
Ostrander |
Type: | Status: new
Uncategorized |
Component: Database | Version: 5.0
layer (models, ORM) | Keywords: prefetch, async,
Severity: Normal | orm
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
{{{aprefetch_related_objects}}} cannot be imported from
{{{django.db.models}}} like {{{prefetch_related_objects}}} can. Because
the docs (https://docs.djangoproject.com/en/5.0/ref/models/querysets
/#prefetch-related-objects) say nothing about importing the async version
from a different place, I believe this to be an oversight.
You can work around this by importing from {{{django.db.models.query}}}
but if that's the intended behavior, the documentation should be updated
to reflect that. Let me know and I'll do so happily! Otherwise, see my
attached patch for a fix to the import.
--
Ticket URL: <https://code.djangoproject.com/ticket/35392>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018ef7a4e533-7c92b1d7-2a60-48e6-9b3a-9f24bb3c4c47-000000%40eu-central-1.amazonses.com.