mirror of https://github.com/django/django.git
f51c1f5900
This patch introduces the Prefetch object which allows customizing prefetch operations. This enables things like filtering prefetched relations, calling select_related from a prefetched relation, or prefetching the same relation multiple times with different querysets. When a Prefetch instance specifies a to_attr argument, the result is stored in a list rather than a QuerySet. This has the fortunate consequence of being significantly faster. The preformance improvement is due to the fact that we save the costly creation of a QuerySet instance. Thanks @akaariai for the original patch and @bmispelon and @timgraham for the reviews. |
||
---|---|---|
.. | ||
class-based-views | ||
contrib | ||
files | ||
forms | ||
models | ||
templates | ||
clickjacking.txt | ||
databases.txt | ||
django-admin.txt | ||
exceptions.txt | ||
index.txt | ||
middleware.txt | ||
request-response.txt | ||
settings.txt | ||
signals.txt | ||
template-response.txt | ||
unicode.txt | ||
urlresolvers.txt | ||
urls.txt | ||
utils.txt | ||
validators.txt | ||
views.txt |