1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Removed versionadded/changed annotations for 3.2.

This commit is contained in:
Mariusz Felisiak
2021-09-16 07:43:34 +02:00
parent 810bca5a1a
commit 97237ad3fe
56 changed files with 3 additions and 455 deletions

View File

@@ -121,11 +121,6 @@ than the path to a configuration class.
from django.apps import apps as django_apps
.. versionchanged:: 3.2
In previous versions, a ``default_app_config`` variable in the application
module was used to identify the default application configuration class.
For application users
---------------------
@@ -205,8 +200,6 @@ Configurable attributes
.. attribute:: AppConfig.default
.. versionadded:: 3.2
Set this attribute to ``False`` to prevent Django from selecting a
configuration class automatically. This is useful when ``apps.py`` defines
only one :class:`AppConfig` subclass but you don't want Django to use it by
@@ -221,8 +214,6 @@ Configurable attributes
.. attribute:: AppConfig.default_auto_field
.. versionadded:: 3.2
The implicit primary key type to add to models within this app. You can
use this to keep :class:`~django.db.models.AutoField` as the primary key
type for third party applications.

View File

@@ -94,10 +94,6 @@ Django's system checks are organized using the following tags:
Some checks may be registered with multiple tags.
.. versionchanged:: 3.2
The ``sites`` tag was added.
.. versionchanged:: 4.0
The ``files`` tag was added.

View File

@@ -344,10 +344,6 @@ views for displaying drilldown pages for date-based data.
* ``'%V'``: ISO 8601 week number where the week begins on Monday.
.. versionadded:: 3.2
Support for the ``'%V'`` week format was added.
**Example myapp/views.py**::
from django.views.generic.dates import WeekArchiveView

View File

@@ -183,10 +183,6 @@ Date-based mixins
it to ``'%W'`` or ``'%V'`` (ISO 8601 week) if your week starts on
Monday.
.. versionadded:: 3.2
Support for the ``'%V'`` week format was added.
.. attribute:: week
**Optional** The value for the week, as a string. By default, set to

View File

@@ -119,13 +119,6 @@ function::
provide human-readable descriptions for callback functions registered
there, too.
.. versionchanged:: 3.2
The ``description`` argument to the :func:`~django.contrib.admin.action`
decorator is equivalent to setting the ``short_description`` attribute on
the action function directly in previous versions. Setting the attribute
directly is still supported for backward compatibility.
Adding actions to the :class:`ModelAdmin`
-----------------------------------------
@@ -419,20 +412,11 @@ For example::
codename = get_permission_codename('publish', opts)
return request.user.has_perm('%s.%s' % (opts.app_label, codename))
.. versionchanged:: 3.2
The ``permissions`` argument to the :func:`~django.contrib.admin.action`
decorator is equivalent to setting the ``allowed_permissions`` attribute on
the action function directly in previous versions. Setting the attribute
directly is still supported for backward compatibility.
The ``action`` decorator
========================
.. function:: action(*, permissions=None, description=None)
.. versionadded:: 3.2
This decorator can be used for setting specific attributes on custom action
functions that can be used with
:attr:`~django.contrib.admin.ModelAdmin.actions`::

View File

@@ -254,14 +254,6 @@ subclass::
def view_birth_date(self, obj):
return obj.birth_date
.. versionchanged:: 3.2
The ``empty_value`` argument to the
:func:`~django.contrib.admin.display` decorator is equivalent to
setting the ``empty_value_display`` attribute on the display function
directly in previous versions. Setting the attribute directly is still
supported for backward compatibility.
.. attribute:: ModelAdmin.exclude
This attribute, if given, should be a list of field names to exclude from
@@ -645,14 +637,6 @@ subclass::
:func:`~django.contrib.admin.display` decorator and passing the
``description`` argument.
.. versionchanged:: 3.2
The ``description`` argument to the
:func:`~django.contrib.admin.display` decorator is equivalent to
setting the ``short_description`` attribute on the display function
directly in previous versions. Setting the attribute directly is
still supported for backward compatibility.
* If the value of a field is ``None``, an empty string, or an iterable
without elements, Django will display ``-`` (a dash). You can override
this with :attr:`AdminSite.empty_value_display`::
@@ -675,14 +659,6 @@ subclass::
def birth_date_view(self, obj):
return obj.birth_date
.. versionchanged:: 3.2
The ``empty_value`` argument to the
:func:`~django.contrib.admin.display` decorator is equivalent to
setting the ``empty_value_display`` attribute on the display function
directly in previous versions. Setting the attribute directly is
still supported for backward compatibility.
* If the string given is a method of the model, ``ModelAdmin`` or a
callable that returns ``True``, ``False``, or ``None``, Django will
display a pretty "yes", "no", or "unknown" icon if you wrap the method
@@ -703,14 +679,6 @@ subclass::
class PersonAdmin(admin.ModelAdmin):
list_display = ('name', 'born_in_fifties')
.. versionchanged:: 3.2
The ``boolean`` argument to the
:func:`~django.contrib.admin.display` decorator is equivalent to
setting the ``boolean`` attribute on the display function directly in
previous versions. Setting the attribute directly is still supported
for backward compatibility.
* The ``__str__()`` method is just as valid in ``list_display`` as any
other model method, so it's perfectly OK to do this::
@@ -782,14 +750,6 @@ subclass::
def full_name(self):
return self.first_name + ' ' + self.last_name
.. versionchanged:: 3.2
The ``ordering`` argument to the
:func:`~django.contrib.admin.display` decorator is equivalent to
setting the ``admin_order_field`` attribute on the display function
directly in previous versions. Setting the attribute directly is
still supported for backward compatibility.
* Elements of ``list_display`` can also be properties::
class Person(models.Model):
@@ -1145,11 +1105,6 @@ subclass::
``prepopulated_fields`` doesn't accept ``DateTimeField``, ``ForeignKey``,
``OneToOneField``, and ``ManyToManyField`` fields.
.. versionchanged:: 3.2
In older versions, various English stop words are removed from
generated values.
.. attribute:: ModelAdmin.preserve_filters
By default, applied filters are preserved on the list view after creating,
@@ -1377,10 +1332,6 @@ subclass::
:meth:`ModelAdmin.get_search_results` to provide additional or alternate
search behavior.
.. versionchanged:: 3.2
Support for searching against quoted phrases with spaces was added.
.. attribute:: ModelAdmin.search_help_text
.. versionadded:: 4.0
@@ -2877,8 +2828,6 @@ creating your own ``AdminSite`` instance (see below), and changing the
Theming support
===============
.. versionadded:: 3.2
The admin uses CSS variables to define colors. This allows changing colors
without having to override many individual CSS rules. For example, if you
preferred purple instead of blue you could add a ``admin/base.html`` template
@@ -2982,8 +2931,6 @@ Templates can override or extend base admin templates as described in
.. attribute:: AdminSite.final_catch_all_view
.. versionadded:: 3.2
A boolean value that determines whether to add a final catch-all view to
the admin that redirects unauthenticated users to the login page. By
default, it is set to ``True``.
@@ -3422,8 +3369,6 @@ The ``display`` decorator
.. function:: display(*, boolean=None, ordering=None, description=None, empty_value=None)
.. versionadded:: 3.2
This decorator can be used for setting specific attributes on custom
display functions that can be used with
:attr:`~django.contrib.admin.ModelAdmin.list_display` or

View File

@@ -511,10 +511,6 @@ The :mod:`django.contrib.contenttypes.forms` module provides:
:class:`~django.contrib.contenttypes.fields.GenericForeignKey.for_concrete_model`
argument on ``GenericForeignKey``.
.. versionchanged:: 3.2
The ``absolute_max`` and ``can_delete_extra`` arguments were added.
.. module:: django.contrib.contenttypes.admin
Generic relations in admin

View File

@@ -92,10 +92,6 @@ each feature in that layer.
Returns the name of the data source.
.. versionchanged:: 3.2
Support for :class:`pathlib.Path` ``ds_input`` was added.
__ https://gdal.org/drivers/vector/
``Layer``
@@ -1409,10 +1405,6 @@ blue.
>>> target.origin
[-82.98492744885776, 27.601924753080144]
.. versionchanged:: 3.2
Support for :class:`SpatialReference` ``srs`` was added
.. attribute:: info
Returns a string with a summary of the raster. This is equivalent to

View File

@@ -142,10 +142,6 @@ Keyword Arguments
Default is ``'default'``.
===================== =====================================================
.. versionchanged:: 3.2
Support for :class:`pathlib.Path` ``data_source`` was added.
``save()`` Keyword Arguments
----------------------------

View File

@@ -69,10 +69,6 @@ Django provides three built-in storage classes in
to prevent manipulation) to persist notifications across requests. Old
messages are dropped if the cookie data size would exceed 2048 bytes.
.. versionchanged:: 3.2
Messages format was changed to the :rfc:`6265` compliant format.
.. class:: storage.fallback.FallbackStorage
This class first uses ``CookieStorage``, and falls back to using

View File

@@ -130,15 +130,11 @@ General-purpose aggregation functions
.. attribute:: distinct
.. versionadded:: 3.2
An optional boolean argument that determines if array values will be
distinct. Defaults to ``False``.
.. attribute:: ordering
.. versionadded:: 3.2
An optional string of a field name (with an optional ``"-"`` prefix
which indicates descending order) or an expression (or a tuple or list
of strings and/or expressions) that specifies the ordering of the

View File

@@ -109,8 +109,6 @@ enforced immediately after every command.
.. attribute:: ExclusionConstraint.include
.. versionadded:: 3.2
A list or tuple of the names of the fields to be included in the covering
exclusion constraint as non-key columns. This allows index-only scans to be
used for queries that select only included fields
@@ -124,8 +122,6 @@ used for queries that select only included fields
.. attribute:: ExclusionConstraint.opclasses
.. versionadded:: 3.2
The names of the `PostgreSQL operator classes
<https://www.postgresql.org/docs/current/indexes-opclass.html>`_ to use for
this constraint. If you require a custom operator class, you must provide one

View File

@@ -28,11 +28,6 @@ available from the ``django.contrib.postgres.indexes`` module.
.. _bloom: https://www.postgresql.org/docs/current/bloom.html
.. versionchanged:: 3.2
Positional argument ``*expressions`` was added in order to support
functional indexes.
``BrinIndex``
=============
@@ -46,11 +41,6 @@ available from the ``django.contrib.postgres.indexes`` module.
The ``pages_per_range`` argument takes a positive integer.
.. versionchanged:: 3.2
Positional argument ``*expressions`` was added in order to support
functional indexes.
.. _automatic summarization: https://www.postgresql.org/docs/current/brin-intro.html#BRIN-OPERATION
``BTreeIndex``
@@ -63,11 +53,6 @@ available from the ``django.contrib.postgres.indexes`` module.
Provide an integer value from 10 to 100 to the fillfactor_ parameter to
tune how packed the index pages will be. PostgreSQL's default is 90.
.. versionchanged:: 3.2
Positional argument ``*expressions`` was added in order to support
functional indexes.
.. _fillfactor: https://www.postgresql.org/docs/current/sql-createindex.html#SQL-CREATEINDEX-STORAGE-PARAMETERS
``GinIndex``
@@ -92,11 +77,6 @@ available from the ``django.contrib.postgres.indexes`` module.
to tune the maximum size of the GIN pending list which is used when
``fastupdate`` is enabled.
.. versionchanged:: 3.2
Positional argument ``*expressions`` was added in order to support
functional indexes.
.. _GIN Fast Update Technique: https://www.postgresql.org/docs/current/gin-implementation.html#GIN-FAST-UPDATE
.. _gin_pending_list_limit: https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-GIN-PENDING-LIST-LIMIT
@@ -127,11 +107,6 @@ available from the ``django.contrib.postgres.indexes`` module.
Provide an integer value from 10 to 100 to the fillfactor_ parameter to
tune how packed the index pages will be. PostgreSQL's default is 90.
.. versionchanged:: 3.2
Positional argument ``*expressions`` was added in order to support
functional indexes.
.. _buffering build: https://www.postgresql.org/docs/current/gist-implementation.html#GIST-BUFFERING-BUILD
.. _fillfactor: https://www.postgresql.org/docs/current/sql-createindex.html#SQL-CREATEINDEX-STORAGE-PARAMETERS
@@ -150,11 +125,6 @@ available from the ``django.contrib.postgres.indexes`` module.
Hash indexes have been available in PostgreSQL for a long time, but
they suffer from a number of data integrity issues in older versions.
.. versionchanged:: 3.2
Positional argument ``*expressions`` was added in order to support
functional indexes.
.. _fillfactor: https://www.postgresql.org/docs/current/sql-createindex.html#SQL-CREATEINDEX-STORAGE-PARAMETERS
``SpGistIndex``
@@ -168,18 +138,11 @@ available from the ``django.contrib.postgres.indexes`` module.
Provide an integer value from 10 to 100 to the fillfactor_ parameter to
tune how packed the index pages will be. PostgreSQL's default is 90.
.. versionchanged:: 3.2
Positional argument ``*expressions`` was added in order to support
functional indexes.
.. _fillfactor: https://www.postgresql.org/docs/current/sql-createindex.html#SQL-CREATEINDEX-STORAGE-PARAMETERS
``OpClass()`` expressions
=========================
.. versionadded:: 3.2
.. class:: OpClass(expression, name)
An ``OpClass()`` expression represents the ``expression`` with a custom

View File

@@ -38,10 +38,6 @@ have to create the extension outside of Django migrations with a user that has
them. In that case, connect to your Django database and run the query
``CREATE EXTENSION IF NOT EXISTS hstore;``.
.. versionchanged:: 3.2
In older versions, the pre-existence of the extension isn't checked.
.. currentmodule:: django.contrib.postgres.operations
``CreateExtension``
@@ -118,8 +114,6 @@ them. In that case, connect to your Django database and run the query
Managing collations using migrations
====================================
.. versionadded:: 3.2
If you need to filter or order a column using a particular collation that your
operating system provides but PostgreSQL does not, you can manage collations in
your database using a migration file. These collations can then be used with

View File

@@ -268,8 +268,6 @@ Note:
.. attribute:: Sitemap.languages
.. versionadded:: 3.2
**Optional.**
A :term:`sequence` of :term:`language codes<language code>` to use for
@@ -278,8 +276,6 @@ Note:
.. attribute:: Sitemap.alternates
.. versionadded:: 3.2
**Optional.**
A boolean attribute. When used in conjunction with
@@ -291,8 +287,6 @@ Note:
.. attribute:: Sitemap.x_default
.. versionadded:: 3.2
**Optional.**
A boolean attribute. When ``True`` the alternate links generated by
@@ -498,10 +492,6 @@ The ``alternates`` attribute is available when :attr:`~Sitemap.i18n` and
versions, including the optional :attr:`~Sitemap.x_default` fallback, for each
URL. Each alternate is a dictionary with ``location`` and ``lang_code`` keys.
.. versionchanged:: 3.2
The ``alternates`` attribute was added.
The ``item`` attribute has been added for each URL to allow more flexible
customization of the templates, such as `Google news sitemaps`_. Assuming
Sitemap's :attr:`~Sitemap.items()` would return a list of items with

View File

@@ -906,11 +906,6 @@ This example illustrates all possible attributes and methods for a
item_comments = 'https://www.example.com/comments' # Hard-coded comments URL
.. versionchanged:: 3.2
Support for a comments URL per feed item was added through the
``item_comments`` hook.
The low-level framework
=======================

View File

@@ -477,10 +477,6 @@ because it is more accurate.
differ only by case will pass validation, but upon calling ``save()``, an
``IntegrityError`` will be raised.
.. versionchanged:: 3.2
Support for setting a database collation for the field was added.
Connecting to the database
--------------------------

View File

@@ -363,8 +363,6 @@ progress bar is shown in the terminal.
Fixtures compression
~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 3.2
The output file can be compressed with one of the ``bz2``, ``gz``, ``lzma``, or
``xz`` formats by ending the filename with the corresponding extension.
For example, to output the data as a compressed JSON file::
@@ -627,10 +625,6 @@ installation will be aborted, and any data installed in the call to
constraints, so if you use MyISAM, you won't get validation of fixture
data, or a rollback if multiple transaction files are found.
.. versionchanged:: 3.2
Support for XZ archives (``.xz``) and LZMA archives (``.lzma``) was added.
Database-specific fixtures
~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -831,12 +825,6 @@ Generate migration files without Django version and timestamp header.
Makes ``makemigrations`` exit with a non-zero status when model changes without
migrations are detected.
.. versionchanged:: 3.2
Support for calling ``makemigrations`` without an active database
connection was added. In that case, check for a consistent migration
history is skipped.
``migrate``
-----------
@@ -1565,16 +1553,12 @@ as :option:`unittest's --buffer option<unittest.-b>`.
.. django-admin-option:: --no-faulthandler
.. versionadded:: 3.2
Django automatically calls :func:`faulthandler.enable()` when starting the
tests, which allows it to print a traceback if the interpreter crashes. Pass
``--no-faulthandler`` to disable this behavior.
.. django-admin-option:: --timing
.. versionadded:: 3.2
Outputs timings, including database setup and total run time.
``testserver``
@@ -1940,10 +1924,6 @@ but which are not automatically detected as supported by Django, may "fake" the
installation of ``ANSICON`` by setting the appropriate environmental variable,
``ANSICON="on"``.
.. versionchanged:: 3.2
Updated support for syntax coloring on Windows.
.. _`Windows Terminal`: https://www.microsoft.com/en-us/p/windows-terminal-preview/9n0dx20hk701
.. _`VS Code`: https://code.visualstudio.com
.. _ANSICON: http://adoxa.altervista.org/ansicon/

View File

@@ -167,8 +167,6 @@ list of errors.
.. exception:: BadRequest
.. versionadded:: 3.2
The :exc:`BadRequest` exception is raised when the request cannot be
processed due to a client error. If a ``BadRequest`` exception reaches the
ASGI/WSGI handler level it results in a
@@ -295,8 +293,6 @@ Sessions exceptions are defined in ``django.contrib.sessions.exceptions``.
.. exception:: SessionInterrupted
.. versionadded:: 3.2
:exc:`SessionInterrupted` is raised when a session is destroyed in a
concurrent request. It's a subclass of
:exc:`~django.core.exceptions.BadRequest`.

View File

@@ -214,8 +214,6 @@ attributes:
.. method:: FileUploadHandler.upload_interrupted()
.. versionadded:: 3.2
Callback signaling that the upload was interrupted, e.g. when the user
closed their browser during file upload.

View File

@@ -17,10 +17,6 @@ Formset API reference. For introductory material about formsets, see the
See :doc:`formsets </topics/forms/formsets>` for example usage.
.. versionchanged:: 3.2
The ``absolute_max`` and ``can_delete_extra`` arguments were added.
.. versionchanged:: 4.0
The ``renderer`` argument was added.

View File

@@ -69,10 +69,6 @@ Model Form API reference. For introductory material about model forms, see the
See :ref:`model-formsets` for example usage.
.. versionchanged:: 3.2
The ``absolute_max`` and ``can_delete_extra`` arguments were added.
.. versionchanged:: 4.0
The ``renderer`` argument was added.
@@ -91,10 +87,6 @@ Model Form API reference. For introductory material about model forms, see the
See :ref:`inline-formsets` for example usage.
.. versionchanged:: 3.2
The ``absolute_max`` and ``can_delete_extra`` arguments were added.
.. versionchanged:: 4.0
The ``renderer`` argument was added.

View File

@@ -72,11 +72,6 @@ Adds a few conveniences for perfectionists:
"""View to be excluded from APPEND_SLASH."""
return HttpResponse()
.. versionchanged:: 3.2
Support for the :func:`~django.views.decorators.common.no_append_slash`
decorator was added.
* Sets the ``Content-Length`` header for non-streaming responses.
.. attribute:: CommonMiddleware.response_redirect_class

View File

@@ -490,10 +490,6 @@ structure of an ``Operation`` looks like this::
# migration containing this operation, or None if not applicable.
return "custom_operation_%s_%s" % (self.arg1, self.arg2)
.. versionadded:: 3.2
The ``migration_name_fragment`` property was added.
You can take this template and work from it, though we suggest looking at the
built-in Django operations in ``django.db.migrations.operations`` - they cover
a lot of the example usage of semi-internal aspects of the migration framework

View File

@@ -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``
--------

View File

@@ -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

View File

@@ -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``

View File

@@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -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::

View File

@@ -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

View File

@@ -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.

View File

@@ -80,8 +80,6 @@ Methods
.. method:: Paginator.get_elided_page_range(number, *, on_each_side=3, on_ends=2)
.. versionadded:: 3.2
Returns a 1-based list of page numbers similar to
:attr:`Paginator.page_range`, but may add an ellipsis to either or both
sides of the current page number when :attr:`Paginator.num_pages` is large.
@@ -106,8 +104,6 @@ Attributes
.. attribute:: Paginator.ELLIPSIS
.. versionadded:: 3.2
A translatable string used as a substitute for elided page numbers in the
page range returned by :meth:`~Paginator.get_elided_page_range`. Default is
``'…'``.

View File

@@ -723,12 +723,6 @@ middleware, are not removed.
HTTP header fields cannot contain newlines. An attempt to set a header field
containing a newline character (CR or LF) will raise ``BadHeaderError``
.. versionchanged:: 3.2
The :attr:`HttpResponse.headers` interface was added.
The ability to set headers on instantiation was added.
Telling the browser to treat the response as a file attachment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -753,8 +747,6 @@ Attributes
.. attribute:: HttpResponse.headers
.. versionadded:: 3.2
A case insensitive, dict-like object that provides an interface to all
HTTP headers on the response. See :ref:`setting-header-fields`.
@@ -824,10 +816,6 @@ Methods
``headers`` is a :class:`dict` of HTTP headers for the response.
.. versionchanged:: 3.2
The ``headers`` parameter was added.
.. method:: HttpResponse.__setitem__(header, value)
Sets the given header name to the given value. Both ``header`` and

View File

@@ -159,10 +159,6 @@ You can use a cache backend that doesn't ship with Django by setting
:setting:`BACKEND <CACHES-BACKEND>` to a fully-qualified path of a cache
backend class (i.e. ``mypackage.backends.whatever.WhateverCache``).
.. versionchanged:: 3.2
The ``PyMemcacheCache`` backend was added.
.. versionchanged:: 4.0
The ``RedisCache`` backend was added.
@@ -1259,8 +1255,6 @@ See also :setting:`NUMBER_GROUPING`, :setting:`THOUSAND_SEPARATOR` and
``DEFAULT_AUTO_FIELD``
----------------------
.. versionadded:: 3.2
Default: ``'``:class:`django.db.models.AutoField`\ ``'``
Default primary key field type to use for models that don't have a field with

View File

@@ -93,10 +93,6 @@ Methods
``headers``
A :class:`dict` of HTTP headers to add to the response.
.. versionchanged:: 3.2
The ``headers`` parameter was added.
.. method:: SimpleTemplateResponse.resolve_context(context)
Preprocesses context data that will be used for rendering a template.
@@ -195,10 +191,6 @@ Methods
``headers``
A :class:`dict` of HTTP headers to add to the response.
.. versionchanged:: 3.2
The ``headers`` parameter was added.
The rendering process
=====================

View File

@@ -1751,10 +1751,6 @@ locale is ``pl`` (Polish):
Using ``floatformat`` with no argument is equivalent to using ``floatformat``
with an argument of ``-1``.
.. versionchanged:: 3.2
The ``g`` suffix to force grouping by thousand separators was added.
.. versionchanged:: 4.0
``floatformat`` template filter no longer depends on the

View File

@@ -139,8 +139,6 @@ If the URL does not resolve, the function raises a
.. attribute:: ResolverMatch.tried
.. versionadded:: 3.2
The list of URL patterns tried before the URL either matched one or
exhausted available patterns.

View File

@@ -821,11 +821,6 @@ appropriate entities.
>>> slugify('你好 World', allow_unicode=True)
'你好-world'
.. versionchanged:: 3.2
In older versions, leading and trailing dashes and underscores are not
removed.
.. _time-zone-selection-functions:
``django.utils.timezone``