mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Corrected example of redundant all() in docs.
This commit is contained in:
parent
32797e7fbf
commit
6df9398cce
@ -111,7 +111,7 @@ belong to this ``QuerySet``. This is done by appending an ``aggregate()``
|
||||
clause onto the ``QuerySet``::
|
||||
|
||||
>>> from django.db.models import Avg
|
||||
>>> Book.objects.aggregate(Avg('price'))
|
||||
>>> Book.objects.all().aggregate(Avg('price'))
|
||||
{'price__avg': 34.35}
|
||||
|
||||
The ``all()`` is redundant in this example, so this could be simplified to::
|
||||
|
Loading…
Reference in New Issue
Block a user