• Loic Bistuer's avatar
    Fixed #17001 -- Custom querysets for prefetch_related. · f51c1f59
    Loic Bistuer yazdı
    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.
    f51c1f59
Adı
Son kayıt (commit)
Son güncelleme
.tx Loading commit data...
django Loading commit data...
docs Loading commit data...
extras Loading commit data...
scripts Loading commit data...
tests Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.hgignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.rst Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
MANIFEST.in Loading commit data...
README.rst Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...