diff options
| author | Simon Charette <charette.s@gmail.com> | 2019-03-19 01:05:47 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-03-21 18:47:46 -0400 |
| commit | 9dc367dc10594ad024c83d398a8e3c3f8f221446 (patch) | |
| tree | 4b0d07779536cac024a2edc44271f7d665dd3637 /docs | |
| parent | 2aaabe2004e1953eb7d7057edcf2fabd37f7394d (diff) | |
Refs #30158 -- Added alias argument to Expression.get_group_by_cols().
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 3 | ||||
| -rw-r--r-- | docs/ref/models/expressions.txt | 9 | ||||
| -rw-r--r-- | docs/releases/3.0.txt | 3 |
3 files changed, 13 insertions, 2 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 02935c01a2..93b6a04594 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -27,6 +27,9 @@ details on these changes. * ``django.views.i18n.set_language()`` will no longer set the user language in ``request.session`` (key ``django.utils.translation.LANGUAGE_SESSION_KEY``). +* ``alias=None`` will be required in the signature of + ``django.db.models.Expression.get_group_by_cols()`` subclasses. + .. _deprecation-removed-in-3.1: 3.1 diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt index bfd5ddea2c..4dc8d9476a 100644 --- a/docs/ref/models/expressions.txt +++ b/docs/ref/models/expressions.txt @@ -974,12 +974,17 @@ calling the appropriate methods on the wrapped expression. A hook allowing the expression to coerce ``value`` into a more appropriate type. - .. method:: get_group_by_cols() + .. method:: get_group_by_cols(alias=None) Responsible for returning the list of columns references by this expression. ``get_group_by_cols()`` should be called on any nested expressions. ``F()`` objects, in particular, hold a reference - to a column. + to a column. The ``alias`` parameter will be ``None`` unless the + expression has been annotated and is used for grouping. + + .. versionchanged:: 3.0 + + The ``alias`` parameter was added. .. method:: asc(nulls_first=False, nulls_last=False) diff --git a/docs/releases/3.0.txt b/docs/releases/3.0.txt index cf50eea1b5..72ecdd3c74 100644 --- a/docs/releases/3.0.txt +++ b/docs/releases/3.0.txt @@ -366,6 +366,9 @@ Miscellaneous in the session in Django 4.0. Since Django 2.1, the language is always stored in the :setting:`LANGUAGE_COOKIE_NAME` cookie. +* ``alias=None`` is added to the signature of + :meth:`.Expression.get_group_by_cols`. + .. _removed-features-3.0: Features removed in 3.0 |
