diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/querysets.txt | 6 | ||||
| -rw-r--r-- | docs/releases/2.2.txt | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 78eb175329..46fcd50e37 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -3336,14 +3336,14 @@ by the aggregate. ``Avg`` ~~~~~~~ -.. class:: Avg(expression, output_field=FloatField(), filter=None, **extra) +.. class:: Avg(expression, output_field=None, filter=None, **extra) Returns the mean value of the given expression, which must be numeric unless you specify a different ``output_field``. * Default alias: ``<field>__avg`` - * Return type: ``float`` (or the type of whatever ``output_field`` is - specified) + * Return type: ``float`` if input is ``int``, otherwise same as input + field, or ``output_field`` if supplied ``Count`` ~~~~~~~~~ diff --git a/docs/releases/2.2.txt b/docs/releases/2.2.txt index 13f7617888..b96b0ed1ef 100644 --- a/docs/releases/2.2.txt +++ b/docs/releases/2.2.txt @@ -493,6 +493,9 @@ Miscellaneous * :djadmin:`runserver` no longer supports `pyinotify` (replaced by Watchman). +* The :class:`~django.db.models.Avg` aggregate function now returns a + ``Decimal`` instead of a ``float`` when the input is ``Decimal``. + .. _deprecated-features-2.2: Features deprecated in 2.2 |
