diff options
| author | Simon Charette <charette.s@gmail.com> | 2020-04-05 15:32:54 -0400 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-04-06 10:01:02 +0200 |
| commit | 98ea4f0f4696221f00e111f1d623452002192e6c (patch) | |
| tree | 74685334d5a200d34e270701252f53e29d903a4e /docs | |
| parent | 4237050684427db45ea834fe89d9e11c0520201e (diff) | |
Refs #7098 -- Deprecated passing raw column aliases to order_by().
Now that order_by() has expression support passing RawSQL() can achieve
the same result.
This was also already supported through QuerySet.extra(order_by) for
years but this API is more or less deprecated at this point.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 3 | ||||
| -rw-r--r-- | docs/releases/3.1.txt | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 7fea512750..257b9a3bf4 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -69,6 +69,9 @@ details on these changes. * ``django.views.generic.TemplateView`` will no longer pass URL kwargs directly to the ``context``. +* Support for passing raw column aliases to ``QuerySet.order_by()`` will be + removed. + See the :ref:`Django 3.1 release notes <deprecated-features-3.1>` for more details on these changes. diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt index 70241b1809..45cd858f0f 100644 --- a/docs/releases/3.1.txt +++ b/docs/releases/3.1.txt @@ -678,6 +678,10 @@ Miscellaneous :class:`~django.views.generic.base.TemplateView` is deprecated. Reference them in the template with ``view.kwargs`` instead. +* Passing raw column aliases to :meth:`.QuerySet.order_by` is deprecated. The + same result can be achieved by passing aliases in a + :class:`~django.db.models.expressions.RawSQL` instead beforehand. + .. _removed-features-3.1: Features removed in 3.1 |
