1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

[4.2.x] Fixed #34808 -- Doc'd aggregate function's default argument.

Backport of 8adc7c86ab from main
This commit is contained in:
lufafajoshua
2023-09-25 13:25:33 +03:00
committed by Natalia
parent 830990fa6c
commit e8fe48d3a0
2 changed files with 55 additions and 10 deletions

View File

@@ -3990,7 +3990,8 @@ by the aggregate.
* Default alias: ``<field>__avg``
* Return type: ``float`` if input is ``int``, otherwise same as input
field, or ``output_field`` if supplied
field, or ``output_field`` if supplied. If the queryset or grouping is
empty, ``default`` is returned.
.. attribute:: distinct
@@ -4028,7 +4029,8 @@ by the aggregate.
Returns the maximum value of the given expression.
* Default alias: ``<field>__max``
* Return type: same as input field, or ``output_field`` if supplied
* Return type: same as input field, or ``output_field`` if supplied. If the
queryset or grouping is empty, ``default`` is returned.
``Min``
~~~~~~~
@@ -4038,7 +4040,8 @@ by the aggregate.
Returns the minimum value of the given expression.
* Default alias: ``<field>__min``
* Return type: same as input field, or ``output_field`` if supplied
* Return type: same as input field, or ``output_field`` if supplied. If the
queryset or grouping is empty, ``default`` is returned.
``StdDev``
~~~~~~~~~~
@@ -4049,7 +4052,8 @@ by the aggregate.
* Default alias: ``<field>__stddev``
* Return type: ``float`` if input is ``int``, otherwise same as input
field, or ``output_field`` if supplied
field, or ``output_field`` if supplied. If the queryset or grouping is
empty, ``default`` is returned.
.. attribute:: sample
@@ -4065,7 +4069,8 @@ by the aggregate.
Computes the sum of all values of the given expression.
* Default alias: ``<field>__sum``
* Return type: same as input field, or ``output_field`` if supplied
* Return type: same as input field, or ``output_field`` if supplied. If the
queryset or grouping is empty, ``default`` is returned.
.. attribute:: distinct
@@ -4082,7 +4087,8 @@ by the aggregate.
* Default alias: ``<field>__variance``
* Return type: ``float`` if input is ``int``, otherwise same as input
field, or ``output_field`` if supplied
field, or ``output_field`` if supplied. If the queryset or grouping is
empty, ``default`` is returned.
.. attribute:: sample