@@ -549,22 +549,17 @@ Examples (those after the first will only work on PostgreSQL):
549549.. code-block:: pycon
550550
551551 >>> Author.objects.distinct()
552- [...]
553-
552+ <QuerySet [...]>
554553 >>> Entry.objects.order_by("pub_date").distinct("pub_date")
555- [...]
556-
554+ <QuerySet [...]>
557555 >>> Entry.objects.order_by("blog").distinct("blog")
558- [...]
559-
556+ <QuerySet [...]>
560557 >>> Entry.objects.order_by("author", "pub_date").distinct("author", "pub_date")
561- [...]
562-
558+ <QuerySet [...]>
563559 >>> Entry.objects.order_by("blog__name", "mod_date").distinct("blog__name", "mod_date")
564- [...]
565-
560+ <QuerySet [...]>
566561 >>> Entry.objects.order_by("author", "pub_date").distinct("author")
567- [...]
562+ <QuerySet [...]>
568563
569564.. note::
570565 Keep in mind that :meth:`order_by` uses any default related model ordering
@@ -1204,7 +1199,7 @@ and run:
12041199.. code-block:: pycon
12051200
12061201 >>> Pizza.objects.all()
1207- [" Hawaiian (ham, pineapple)", " Seafood (prawns, smoked salmon)" ...
1202+ <QuerySet [<Pizza: Hawaiian (ham, pineapple)>, <Pizza: Seafood (prawns, smoked salmon)>, ...]>
12081203
12091204The problem with this is that every time ``Pizza.__str__()`` asks for
12101205``self.toppings.all()`` it has to query the database, so
@@ -1990,7 +1985,7 @@ them:
19901985.. code-block:: pycon
19911986
19921987 >>> Person.objects.select_related("hometown").select_for_update().exclude(hometown=None)
1993- <QuerySet [<Person: ...) >, ...]>
1988+ <QuerySet [<Person: ...>, ...]>
19941989
19951990The ``postgresql``, ``oracle``, and ``mysql`` database backends support
19961991``select_for_update()``. However, MariaDB only supports the ``nowait``
@@ -4240,7 +4235,7 @@ attribute:
42404235
42414236 >>> prefetch = Prefetch("choice_set", queryset=voted_choices, to_attr="voted_choices")
42424237 >>> Question.objects.prefetch_related(prefetch).get().voted_choices
4243- [<Choice: The sky>]
4238+ <QuerySet [<Choice: The sky>]>
42444239 >>> Question.objects.prefetch_related(prefetch).get().choice_set.all()
42454240 <QuerySet [<Choice: Not much>, <Choice: The sky>, <Choice: Just hacking again>]>
42464241
0 commit comments