Changes between Initial Version and Version 1 of Ticket #23623, comment 4
- Timestamp:
- Oct 9, 2014, 7:57:47 AM (10 years ago)
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.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 every time it is used. 2 2 3 3 I 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.