summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/querysets.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 3dc66f631a..d2cbc63203 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -2802,12 +2802,19 @@ by the aggregate.
Avg
~~~
-.. class:: Avg(expression, output_field=None, **extra)
+.. class:: Avg(expression, output_field=FloatField(), **extra)
- Returns the mean value of the given expression, which must be numeric.
+ 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``
+ * Return type: ``float`` (or the type of whatever ``output_field`` is
+ specified)
+
+ .. versionchanged:: 1.9
+
+ The ``output_field`` parameter was added to allow aggregating over
+ non-numeric columns, such as ``DurationField``.
Count
~~~~~