Changes between Initial Version and Version 1 of Ticket #29985, comment 2


Ignore:
Timestamp:
Nov 26, 2018, 1:42:44 AM (6 years ago)
Author:
Carlton Gibson

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29985, comment 2

    initial v1  
    33Thanks for the suggestion here. I'm going to say `wontfix`: `ModelAdmin` already has **many** options, we don't want to add more unless it's going to be for a core use-case.
    44
    5 Have you thought about using an [https://docs.djangoproject.com/en/2.1/ref/models/querysets/#annotate annotation] to provide the `item_count` value? This would save the second query entirely. It that's not fast enough for you I would advise examining `request` in `get_queryset()` to only conditionally apply the prefetch.
     5Have you thought about using an [https://docs.djangoproject.com/en/2.1/ref/models/querysets/#annotate annotation] to provide the `item_count` value? This would save the second query entirely. It that's not fast enough for you I would advise examining `request` in `get_queryset()` to only conditionally apply the prefetch (or annotation).
Back to Top