#32587: Use RelatedManager of parent object in get_queryset of inlines and
support
prfetching
-------------------------------------+-------------------------------------
Reporter: Andreas Galazis | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: contrib.admin | Version: 3.2
Severity: Normal | Resolution:
Keywords: admin, prefetch, | Triage Stage:
inline | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Andreas Galazis:
Old description:
> This would help support prefetching configuration on parent admin's
> queryset.
New description:
This would help support prefetching configuration on parent admin's
queryset.
This is not sufficient to support prefetching since there are multiple (I
have found at least 3) instances in inline admin ans inline formset where
self.get_queryset()[i] paradigm is used.
At least perform some code cleanup?
Even if this issue a won't fix for any reason at least abstract fetching
instance by in index in a `ge_instance_by_index` method so that we can
implement admins that do what we want of top of current base classes. If
this is done then we will be able to overwrite ge_instance_by_index to
return `list(self.get_queryset())[i]`
instead of `self.get_queryset()[i]` on inlines that support prefetching
--
--
Ticket URL: <https://code.djangoproject.com/ticket/32587#comment:3>
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/066.8ca5c220203acc005f79c69a4d6653ea%40djangoproject.com.