Ticket #30079: ticket_30079.patch

File ticket_30079.patch, 1.0 KB (added by Carlton Gibson, 5 years ago)

Adjustment of admonition wording.

  • docs/ref/models/querysets.txt

    commit b192cb6623b62967e5d9ded0b4f8eb32c4a7a0e5
    Author: Carlton Gibson <carlton.gibson@noumenal.es>
    Date:   Tue Jan 22 10:52:59 2019 +0100
    
        Fixed #30079 -- Adjusted working of prefetch_related admonition.
    
    diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
    index eae7bf877a..b1dff18943 100644
    a b database.  
    10741074.. note::
    10751075
    10761076    Remember that, as always with ``QuerySets``, any subsequent chained methods
    1077     which imply a different database query will ignore previously cached
    1078     results, and retrieve data using a fresh database query. So, if you write
    1079     the following:
     1077    which return a new ``QuerySet``, normally implying a different database
     1078    query, will ignore previously cached results, and retrieve data using a
     1079    fresh database query. So, if you write the following:
    10801080
    10811081        >>> pizzas = Pizza.objects.prefetch_related('toppings')
    10821082        >>> [list(pizza.toppings.filter(spicy=True)) for pizza in pizzas]
Back to Top