Changes between Initial Version and Version 1 of Ticket #23623, comment 4


Ignore:
Timestamp:
10/09/14 12:57:47 (8 years ago)
Author:
Thomas Chaumeny
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23623, comment 4

    initial v1  
    1 I missed that ticket, thanks. My understanding of #22841 is that it proposes a way to "tell" the `ModelChoiceField` to reuse a `queryset` instead of reevaluating it at each time.
     1I missed that ticket, thanks. My understanding of #22841 is that it proposes a way to "tell" the `ModelChoiceField` to reuse a `queryset` instead of reevaluating it every time it is used.
    22
    33I think that my PR is related but compatible with that proposed change as it handles the case where we don't want to reuse the `queryset`. That case is currently handled by iterating on `queryset.all()` — which creates a cloned unevaluated queryset — to construct the choices. My proposition is to use `iterator()` instead as this is designed precisely for those cases where you don't want to use cache nor to populate it.
Back to Top