mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #25508 -- Modified QuerySet.__repr__() to disambiguate it from a list.
This commit is contained in:
parent
3543fec3b7
commit
e0837f2cb1
20 changed files with 185 additions and 184 deletions
|
@ -79,7 +79,7 @@ In a hurry? Here's how to do common aggregate queries, assuming the models above
|
|||
>>> from django.db.models import Count
|
||||
>>> pubs = Publisher.objects.annotate(num_books=Count('book'))
|
||||
>>> pubs
|
||||
[<Publisher BaloneyPress>, <Publisher SalamiPress>, ...]
|
||||
<QuerySet [<Publisher: BaloneyPress>, <Publisher: SalamiPress>, ...]>
|
||||
>>> pubs[0].num_books
|
||||
73
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue