mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Removed versionadded/changed annotations for 3.2.
This commit is contained in:
@@ -92,10 +92,6 @@ Keep in mind that each of these values can be an expression.
|
||||
>>> When(then__exact=0, then=1)
|
||||
>>> When(Q(then=0), then=1)
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
Support for using the ``condition`` argument with ``lookups`` was added.
|
||||
|
||||
``Case``
|
||||
--------
|
||||
|
||||
|
||||
@@ -165,8 +165,6 @@ enforced immediately after every command.
|
||||
|
||||
.. attribute:: UniqueConstraint.include
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
A list or tuple of the names of the fields to be included in the covering
|
||||
unique index as non-key columns. This allows index-only scans to be used for
|
||||
queries that select only included fields (:attr:`~UniqueConstraint.include`)
|
||||
@@ -189,8 +187,6 @@ Non-key columns have the same database restrictions as :attr:`Index.include`.
|
||||
|
||||
.. attribute:: UniqueConstraint.opclasses
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
The names of the `PostgreSQL operator classes
|
||||
<https://www.postgresql.org/docs/current/indexes-opclass.html>`_ to use for
|
||||
this unique index. If you require a custom operator class, you must provide one
|
||||
|
||||
@@ -97,8 +97,6 @@ Usage examples::
|
||||
|
||||
.. class:: Collate(expression, collation)
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
Takes an expression and a collation name to query against.
|
||||
|
||||
For example, to filter case-insensitively in SQLite::
|
||||
@@ -158,8 +156,6 @@ and ``comment.modified``.
|
||||
|
||||
.. class:: JSONObject(**fields)
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
Takes a list of key-value pairs and returns a JSON object containing those
|
||||
pairs.
|
||||
|
||||
@@ -663,10 +659,6 @@ that deal with date-parts can be used with ``DateField``::
|
||||
.. attribute:: lookup_name = 'date'
|
||||
.. attribute:: output_field = DateField()
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
The ``tzinfo`` parameter was added.
|
||||
|
||||
``TruncDate`` casts ``expression`` to a date rather than using the built-in SQL
|
||||
truncate function. It's also registered as a transform on ``DateTimeField`` as
|
||||
``__date``.
|
||||
@@ -676,10 +668,6 @@ truncate function. It's also registered as a transform on ``DateTimeField`` as
|
||||
.. attribute:: lookup_name = 'time'
|
||||
.. attribute:: output_field = TimeField()
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
The ``tzinfo`` parameter was added.
|
||||
|
||||
``TruncTime`` casts ``expression`` to a time rather than using the built-in SQL
|
||||
truncate function. It's also registered as a transform on ``DateTimeField`` as
|
||||
``__time``.
|
||||
@@ -1162,8 +1150,6 @@ It can also be registered as a transform. For example::
|
||||
|
||||
.. class:: Random(**extra)
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
Returns a random value in the range ``0.0 ≤ x < 1.0``.
|
||||
|
||||
``Round``
|
||||
|
||||
@@ -163,10 +163,6 @@ the field value of each one, and saving each one back to the database::
|
||||
* getting the database, rather than Python, to do work
|
||||
* reducing the number of queries some operations require
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
Support for transforms of the field was added.
|
||||
|
||||
.. _avoiding-race-conditions-using-f:
|
||||
|
||||
Avoiding race conditions using ``F()``
|
||||
@@ -460,10 +456,6 @@ grouping) contains no entries.
|
||||
The ``**extra`` kwargs are ``key=value`` pairs that can be interpolated
|
||||
into the ``template`` attribute.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
Support for transforms of the field was added.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``default`` argument was added.
|
||||
@@ -522,11 +514,6 @@ inferred from the :py:class:`type` of the provided ``value``, if possible. For
|
||||
example, passing an instance of :py:class:`datetime.datetime` as ``value``
|
||||
would default ``output_field`` to :class:`~django.db.models.DateTimeField`.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
Support for inferring a default ``output_field`` from the type of ``value``
|
||||
was added.
|
||||
|
||||
``ExpressionWrapper()`` expressions
|
||||
-----------------------------------
|
||||
|
||||
@@ -595,10 +582,6 @@ parent. For example, this queryset would need to be within a nested pair of
|
||||
|
||||
>>> Book.objects.filter(author=OuterRef(OuterRef('pk')))
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
Support for transforms of the field was added.
|
||||
|
||||
Limiting a subquery to a single column
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -436,11 +436,6 @@ The primary key field is read-only. If you change the value of the primary
|
||||
key on an existing object and then save it, a new object will be created
|
||||
alongside the old one.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
In older versions, auto-created primary key fields were always
|
||||
:class:`AutoField`\s.
|
||||
|
||||
``unique``
|
||||
----------
|
||||
|
||||
@@ -623,8 +618,6 @@ The default form widget for this field is a :class:`~django.forms.TextInput`.
|
||||
|
||||
.. attribute:: CharField.db_collation
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
Optional. The database collation name of the field.
|
||||
|
||||
.. note::
|
||||
@@ -1347,8 +1340,6 @@ However it is not enforced at the model or database level. Use a
|
||||
|
||||
.. attribute:: TextField.db_collation
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
The database collation name of the field.
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -30,8 +30,6 @@ options`_.
|
||||
|
||||
.. attribute:: Index.expressions
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
Positional argument ``*expressions`` allows creating functional indexes on
|
||||
expressions and database functions.
|
||||
|
||||
@@ -188,8 +186,6 @@ indexes records with more than 400 pages.
|
||||
|
||||
.. attribute:: Index.include
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
A list or tuple of the names of the fields to be included in the covering index
|
||||
as non-key columns. This allows index-only scans to be used for queries that
|
||||
select only included fields (:attr:`~Index.include`) and filter only by indexed
|
||||
|
||||
@@ -286,8 +286,6 @@ Aggregation </topics/db/aggregation>`.
|
||||
|
||||
.. method:: alias(*args, **kwargs)
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
Same as :meth:`annotate`, but instead of annotating objects in the
|
||||
``QuerySet``, saves the expression for later reuse with other ``QuerySet``
|
||||
methods. This is useful when the result of the expression itself is not needed
|
||||
@@ -1832,12 +1830,6 @@ raised if ``select_for_update()`` is used in autocommit mode.
|
||||
PostgreSQL doesn't support ``select_for_update()`` with
|
||||
:class:`~django.db.models.expressions.Window` expressions.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
The ``no_key`` argument was added.
|
||||
|
||||
The ``of`` argument was allowed on MySQL 8.0.1+.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``skip_locked`` argument was allowed on MariaDB 10.6+.
|
||||
@@ -1860,11 +1852,6 @@ See the :doc:`/topics/db/sql` for more information.
|
||||
filtering. As such, it should generally be called from the ``Manager`` or
|
||||
from a fresh ``QuerySet`` instance.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
The default value of the ``params`` argument was changed from ``None`` to
|
||||
an empty tuple.
|
||||
|
||||
Operators that return new ``QuerySet``\s
|
||||
----------------------------------------
|
||||
|
||||
@@ -2328,10 +2315,6 @@ Example::
|
||||
|
||||
If you pass ``in_bulk()`` an empty list, you'll get an empty dictionary.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
Using a distinct field was allowed.
|
||||
|
||||
``iterator()``
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
@@ -2658,8 +2641,6 @@ update a bunch of records for a model that has a custom
|
||||
Ordered queryset
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
Chaining ``order_by()`` with ``update()`` is supported only on MariaDB and
|
||||
MySQL, and is ignored for different databases. This is useful for updating a
|
||||
unique field in the order that is specified without conflicts. For example::
|
||||
@@ -3558,10 +3539,6 @@ All aggregates have the following parameters in common:
|
||||
Strings that reference fields on the model, transforms of the field, or
|
||||
:doc:`query expressions </ref/models/expressions>`.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
Support for transforms of the field was added.
|
||||
|
||||
``output_field``
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -3847,7 +3824,3 @@ operate on vegetarian pizzas.
|
||||
* :meth:`.QuerySet.only` and :meth:`~.QuerySet.prefetch_related`.
|
||||
* A :class:`~django.contrib.contenttypes.fields.GenericForeignKey`
|
||||
inherited from a parent model.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
|
||||
Support for nested relations was added.
|
||||
|
||||
Reference in New Issue
Block a user