Removed versionadded/changed annotations for 3.1.
This commit is contained in:
parent
8774b1144c
commit
b7dd89ed53
|
@ -364,7 +364,3 @@ the management command to exit with, using :func:`sys.exit`.
|
||||||
If a management command is called from code through
|
If a management command is called from code through
|
||||||
:func:`~django.core.management.call_command`, it's up to you to catch the
|
:func:`~django.core.management.call_command`, it's up to you to catch the
|
||||||
exception when needed.
|
exception when needed.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The ``returncode`` argument was added.
|
|
||||||
|
|
|
@ -269,16 +269,12 @@ following attributes and methods:
|
||||||
|
|
||||||
.. attribute:: cleansed_substitute
|
.. attribute:: cleansed_substitute
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
The string value to replace sensitive value with. By default it
|
The string value to replace sensitive value with. By default it
|
||||||
replaces the values of sensitive variables with stars
|
replaces the values of sensitive variables with stars
|
||||||
(``**********``).
|
(``**********``).
|
||||||
|
|
||||||
.. attribute:: hidden_settings
|
.. attribute:: hidden_settings
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
A compiled regular expression object used to match settings and
|
A compiled regular expression object used to match settings and
|
||||||
``request.META`` values considered as sensitive. By default equivalent
|
``request.META`` values considered as sensitive. By default equivalent
|
||||||
to::
|
to::
|
||||||
|
@ -307,8 +303,6 @@ following attributes and methods:
|
||||||
traceback frame. Sensitive values are replaced with
|
traceback frame. Sensitive values are replaced with
|
||||||
:attr:`cleansed_substitute`.
|
:attr:`cleansed_substitute`.
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
If you need to customize error reports beyond filtering you may specify a
|
If you need to customize error reports beyond filtering you may specify a
|
||||||
custom error reporter class by defining the
|
custom error reporter class by defining the
|
||||||
:setting:`DEFAULT_EXCEPTION_REPORTER` setting::
|
:setting:`DEFAULT_EXCEPTION_REPORTER` setting::
|
||||||
|
|
|
@ -93,15 +93,6 @@ Django's system checks are organized using the following tags:
|
||||||
|
|
||||||
Some checks may be registered with multiple tags.
|
Some checks may be registered with multiple tags.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The ``async_support`` tag was added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The ``database`` checks are now run only for database aliases specified
|
|
||||||
using the :option:`check --database` option.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.2
|
.. versionchanged:: 3.2
|
||||||
|
|
||||||
The ``sites`` tag was added.
|
The ``sites`` tag was added.
|
||||||
|
@ -112,8 +103,6 @@ Core system checks
|
||||||
Asynchronous support
|
Asynchronous support
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
The following checks verify your setup for :doc:`/topics/async`:
|
The following checks verify your setup for :doc:`/topics/async`:
|
||||||
|
|
||||||
* **async.E001**: You should not set the :envvar:`DJANGO_ALLOW_ASYNC_UNSAFE`
|
* **async.E001**: You should not set the :envvar:`DJANGO_ALLOW_ASYNC_UNSAFE`
|
||||||
|
|
|
@ -40,12 +40,6 @@ If you're not using the default project template, here are the requirements:
|
||||||
the ``'context_processors'`` option of :setting:`OPTIONS
|
the ``'context_processors'`` option of :setting:`OPTIONS
|
||||||
<TEMPLATES-OPTIONS>`.
|
<TEMPLATES-OPTIONS>`.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
``django.template.context_processors.request`` was added as a
|
|
||||||
requirement in the ``'context_processors'`` option to support the new
|
|
||||||
:attr:`.AdminSite.enable_nav_sidebar`.
|
|
||||||
|
|
||||||
#. If you've customized the :setting:`MIDDLEWARE` setting,
|
#. If you've customized the :setting:`MIDDLEWARE` setting,
|
||||||
:class:`django.contrib.auth.middleware.AuthenticationMiddleware` and
|
:class:`django.contrib.auth.middleware.AuthenticationMiddleware` and
|
||||||
:class:`django.contrib.messages.middleware.MessageMiddleware` must be
|
:class:`django.contrib.messages.middleware.MessageMiddleware` must be
|
||||||
|
@ -1042,10 +1036,6 @@ subclass::
|
||||||
The :class:`~django.contrib.contenttypes.fields.GenericForeignKey`
|
The :class:`~django.contrib.contenttypes.fields.GenericForeignKey`
|
||||||
field is not supported.
|
field is not supported.
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
The ``EmptyFieldListFilter`` class was added.
|
|
||||||
|
|
||||||
List filter's typically appear only if the filter has more than one choice.
|
List filter's typically appear only if the filter has more than one choice.
|
||||||
A filter's ``has_output()`` method controls whether or not it appears.
|
A filter's ``has_output()`` method controls whether or not it appears.
|
||||||
|
|
||||||
|
@ -2230,10 +2220,6 @@ To avoid conflicts with user-supplied scripts or libraries, Django's jQuery
|
||||||
in your own admin JavaScript without including a second copy, you can use the
|
in your own admin JavaScript without including a second copy, you can use the
|
||||||
``django.jQuery`` object on changelist and add/edit views.
|
``django.jQuery`` object on changelist and add/edit views.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
jQuery was upgraded from 3.4.1 to 3.5.1.
|
|
||||||
|
|
||||||
The :class:`ModelAdmin` class requires jQuery by default, so there is no need
|
The :class:`ModelAdmin` class requires jQuery by default, so there is no need
|
||||||
to add jQuery to your ``ModelAdmin``’s list of media resources unless you have
|
to add jQuery to your ``ModelAdmin``’s list of media resources unless you have
|
||||||
a specific need. For example, if you require the jQuery library to be in the
|
a specific need. For example, if you require the jQuery library to be in the
|
||||||
|
@ -2953,8 +2939,6 @@ Templates can override or extend base admin templates as described in
|
||||||
|
|
||||||
.. attribute:: AdminSite.enable_nav_sidebar
|
.. attribute:: AdminSite.enable_nav_sidebar
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
A boolean value that determines whether to show the navigation sidebar
|
A boolean value that determines whether to show the navigation sidebar
|
||||||
on larger screens. By default, it is set to ``True``.
|
on larger screens. By default, it is set to ``True``.
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,6 @@ Fields
|
||||||
Optional (:attr:`blank=True <django.db.models.Field.blank>`). 150
|
Optional (:attr:`blank=True <django.db.models.Field.blank>`). 150
|
||||||
characters or fewer.
|
characters or fewer.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The ``max_length`` increased from 30 to 150 characters.
|
|
||||||
|
|
||||||
.. attribute:: last_name
|
.. attribute:: last_name
|
||||||
|
|
||||||
Optional (:attr:`blank=True <django.db.models.Field.blank>`). 150
|
Optional (:attr:`blank=True <django.db.models.Field.blank>`). 150
|
||||||
|
|
|
@ -83,10 +83,6 @@ Keyword Argument Description
|
||||||
Oracle.
|
Oracle.
|
||||||
===================== =====================================================
|
===================== =====================================================
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Oracle support was added.
|
|
||||||
|
|
||||||
``AsGML``
|
``AsGML``
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
@ -144,10 +140,6 @@ Keyword Argument Description
|
||||||
|
|
||||||
__ https://developers.google.com/kml/documentation/
|
__ https://developers.google.com/kml/documentation/
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The undocumented ``version`` parameter was removed.
|
|
||||||
|
|
||||||
``AsSVG``
|
``AsSVG``
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
@ -177,8 +169,6 @@ __ https://www.w3.org/Graphics/SVG/
|
||||||
|
|
||||||
.. class:: AsWKB(expression, **extra)
|
.. class:: AsWKB(expression, **extra)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
*Availability*: MariaDB, `MySQL
|
*Availability*: MariaDB, `MySQL
|
||||||
<https://dev.mysql.com/doc/refman/en/gis-format-conversion-functions.html#function_st-asbinary>`__,
|
<https://dev.mysql.com/doc/refman/en/gis-format-conversion-functions.html#function_st-asbinary>`__,
|
||||||
Oracle, `PostGIS <https://postgis.net/docs/ST_AsBinary.html>`__, SpatiaLite
|
Oracle, `PostGIS <https://postgis.net/docs/ST_AsBinary.html>`__, SpatiaLite
|
||||||
|
@ -198,8 +188,6 @@ __ https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well
|
||||||
|
|
||||||
.. class:: AsWKT(expression, **extra)
|
.. class:: AsWKT(expression, **extra)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
*Availability*: MariaDB, `MySQL
|
*Availability*: MariaDB, `MySQL
|
||||||
<https://dev.mysql.com/doc/refman/en/gis-format-conversion-functions.html#function_st-astext>`__,
|
<https://dev.mysql.com/doc/refman/en/gis-format-conversion-functions.html#function_st-astext>`__,
|
||||||
Oracle, `PostGIS <https://postgis.net/docs/ST_AsText.html>`__, SpatiaLite
|
Oracle, `PostGIS <https://postgis.net/docs/ST_AsText.html>`__, SpatiaLite
|
||||||
|
|
|
@ -439,10 +439,6 @@ PostGIS SQL equivalent:
|
||||||
SELECT ... WHERE ST_Relate(poly, ST_Polygon(rast, 1), 'T*T***FF*')
|
SELECT ... WHERE ST_Relate(poly, ST_Polygon(rast, 1), 'T*T***FF*')
|
||||||
SELECT ... WHERE ST_Relate(ST_Polygon(rast, 2), ST_Polygon(rast, 1), 'T*T***FF*')
|
SELECT ... WHERE ST_Relate(ST_Polygon(rast, 2), ST_Polygon(rast, 1), 'T*T***FF*')
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
MariaDB support was added.
|
|
||||||
|
|
||||||
Oracle
|
Oracle
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
|
|
|
@ -729,8 +729,6 @@ Other Properties & Methods
|
||||||
|
|
||||||
.. attribute:: is_counterclockwise
|
.. attribute:: is_counterclockwise
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Returns whether this ``LinearRing`` is counterclockwise.
|
Returns whether this ``LinearRing`` is counterclockwise.
|
||||||
|
|
||||||
``Polygon``
|
``Polygon``
|
||||||
|
|
|
@ -78,10 +78,6 @@ e.g. with the ``'de'`` language:
|
||||||
* ``1200000000`` becomes ``'1,2 Milliarden'``.
|
* ``1200000000`` becomes ``'1,2 Milliarden'``.
|
||||||
* ``-1200000000`` becomes ``'-1,2 Milliarden'``.
|
* ``-1200000000`` becomes ``'-1,2 Milliarden'``.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for negative integers was added.
|
|
||||||
|
|
||||||
.. templatefilter:: naturalday
|
.. templatefilter:: naturalday
|
||||||
|
|
||||||
``naturalday``
|
``naturalday``
|
||||||
|
|
|
@ -79,8 +79,6 @@ These conditions have the same database restrictions as
|
||||||
|
|
||||||
.. attribute:: ExclusionConstraint.deferrable
|
.. attribute:: ExclusionConstraint.deferrable
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Set this parameter to create a deferrable exclusion constraint. Accepted values
|
Set this parameter to create a deferrable exclusion constraint. Accepted values
|
||||||
are ``Deferrable.DEFERRED`` or ``Deferrable.IMMEDIATE``. For example::
|
are ``Deferrable.DEFERRED`` or ``Deferrable.IMMEDIATE``. For example::
|
||||||
|
|
||||||
|
|
|
@ -686,14 +686,6 @@ The ``contained_by`` lookup is also available on the non-range field types:
|
||||||
... )
|
... )
|
||||||
<QuerySet [<Event: Soft play>]>
|
<QuerySet [<Event: Soft play>]>
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for :class:`~django.db.models.SmallAutoField`,
|
|
||||||
:class:`~django.db.models.AutoField`,
|
|
||||||
:class:`~django.db.models.BigAutoField`,
|
|
||||||
:class:`~django.db.models.SmallIntegerField`, and
|
|
||||||
:class:`~django.db.models.DecimalField` was added.
|
|
||||||
|
|
||||||
.. fieldlookup:: rangefield.overlap
|
.. fieldlookup:: rangefield.overlap
|
||||||
|
|
||||||
``overlap``
|
``overlap``
|
||||||
|
@ -813,8 +805,6 @@ Returned objects are empty ranges. Can be chained to valid lookups for a
|
||||||
``lower_inc``
|
``lower_inc``
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Returns objects that have inclusive or exclusive lower bounds, depending on the
|
Returns objects that have inclusive or exclusive lower bounds, depending on the
|
||||||
boolean value passed. Can be chained to valid lookups for a
|
boolean value passed. Can be chained to valid lookups for a
|
||||||
:class:`~django.db.models.BooleanField`.
|
:class:`~django.db.models.BooleanField`.
|
||||||
|
@ -827,8 +817,6 @@ boolean value passed. Can be chained to valid lookups for a
|
||||||
``lower_inf``
|
``lower_inf``
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Returns objects that have unbounded (infinite) or bounded lower bound,
|
Returns objects that have unbounded (infinite) or bounded lower bound,
|
||||||
depending on the boolean value passed. Can be chained to valid lookups for a
|
depending on the boolean value passed. Can be chained to valid lookups for a
|
||||||
:class:`~django.db.models.BooleanField`.
|
:class:`~django.db.models.BooleanField`.
|
||||||
|
@ -841,8 +829,6 @@ depending on the boolean value passed. Can be chained to valid lookups for a
|
||||||
``upper_inc``
|
``upper_inc``
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Returns objects that have inclusive or exclusive upper bounds, depending on the
|
Returns objects that have inclusive or exclusive upper bounds, depending on the
|
||||||
boolean value passed. Can be chained to valid lookups for a
|
boolean value passed. Can be chained to valid lookups for a
|
||||||
:class:`~django.db.models.BooleanField`.
|
:class:`~django.db.models.BooleanField`.
|
||||||
|
@ -855,8 +841,6 @@ boolean value passed. Can be chained to valid lookups for a
|
||||||
``upper_inf``
|
``upper_inf``
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Returns objects that have unbounded (infinite) or bounded upper bound,
|
Returns objects that have unbounded (infinite) or bounded upper bound,
|
||||||
depending on the boolean value passed. Can be chained to valid lookups for a
|
depending on the boolean value passed. Can be chained to valid lookups for a
|
||||||
:class:`~django.db.models.BooleanField`.
|
:class:`~django.db.models.BooleanField`.
|
||||||
|
|
|
@ -12,8 +12,6 @@ available from the ``django.contrib.postgres.indexes`` module.
|
||||||
|
|
||||||
.. class:: BloomIndex(*expressions, length=None, columns=(), **options)
|
.. class:: BloomIndex(*expressions, length=None, columns=(), **options)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Creates a bloom_ index.
|
Creates a bloom_ index.
|
||||||
|
|
||||||
To use this index access you need to activate the bloom_ extension on
|
To use this index access you need to activate the bloom_ extension on
|
||||||
|
|
|
@ -61,8 +61,6 @@ them. In that case, connect to your Django database and run the query
|
||||||
|
|
||||||
.. class:: BloomExtension()
|
.. class:: BloomExtension()
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Installs the ``bloom`` extension.
|
Installs the ``bloom`` extension.
|
||||||
|
|
||||||
``BtreeGinExtension``
|
``BtreeGinExtension``
|
||||||
|
|
|
@ -35,10 +35,6 @@ query and the vector.
|
||||||
To use the ``search`` lookup, ``'django.contrib.postgres'`` must be in your
|
To use the ``search`` lookup, ``'django.contrib.postgres'`` must be in your
|
||||||
:setting:`INSTALLED_APPS`.
|
:setting:`INSTALLED_APPS`.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for query expressions was added.
|
|
||||||
|
|
||||||
``SearchVector``
|
``SearchVector``
|
||||||
================
|
================
|
||||||
|
|
||||||
|
@ -110,11 +106,6 @@ Examples:
|
||||||
See :ref:`postgresql-fts-search-configuration` for an explanation of the
|
See :ref:`postgresql-fts-search-configuration` for an explanation of the
|
||||||
``config`` parameter.
|
``config`` parameter.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for ``'websearch'`` search type and query expressions in
|
|
||||||
``SearchQuery.value`` were added.
|
|
||||||
|
|
||||||
``SearchRank``
|
``SearchRank``
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
@ -159,15 +150,9 @@ normalization options`_.
|
||||||
|
|
||||||
.. _different rank normalization options: https://www.postgresql.org/docs/current/textsearch-controls.html#TEXTSEARCH-RANKING
|
.. _different rank normalization options: https://www.postgresql.org/docs/current/textsearch-controls.html#TEXTSEARCH-RANKING
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
The ``normalization`` and ``cover_density`` parameters were added.
|
|
||||||
|
|
||||||
``SearchHeadline``
|
``SearchHeadline``
|
||||||
==================
|
==================
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
.. class:: SearchHeadline(expression, query, config=None, start_sel=None, stop_sel=None, max_words=None, min_words=None, short_word=None, highlight_all=None, max_fragments=None, fragment_delimiter=None)
|
.. class:: SearchHeadline(expression, query, config=None, start_sel=None, stop_sel=None, max_words=None, min_words=None, short_word=None, highlight_all=None, max_fragments=None, fragment_delimiter=None)
|
||||||
|
|
||||||
Accepts a single text field or an expression, a query, a config, and a set of
|
Accepts a single text field or an expression, a query, a config, and a set of
|
||||||
|
|
|
@ -106,8 +106,6 @@ For example, to perform only models and compatibility checks, run::
|
||||||
|
|
||||||
.. django-admin-option:: --database DATABASE
|
.. django-admin-option:: --database DATABASE
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Specifies the database to run checks requiring database access::
|
Specifies the database to run checks requiring database access::
|
||||||
|
|
||||||
django-admin check --database default --database other
|
django-admin check --database default --database other
|
||||||
|
@ -226,8 +224,6 @@ Specifies the database onto which to open a shell. Defaults to ``default``.
|
||||||
|
|
||||||
.. django-admin-option:: -- ARGUMENTS
|
.. django-admin-option:: -- ARGUMENTS
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Any arguments following a ``--`` divider will be passed on to the underlying
|
Any arguments following a ``--`` divider will be passed on to the underlying
|
||||||
command-line client. For example, with PostgreSQL you can use the ``psql``
|
command-line client. For example, with PostgreSQL you can use the ``psql``
|
||||||
command's ``-c`` flag to execute a raw SQL query directly:
|
command's ``-c`` flag to execute a raw SQL query directly:
|
||||||
|
@ -914,8 +910,6 @@ content types.
|
||||||
|
|
||||||
.. django-admin-option:: --check
|
.. django-admin-option:: --check
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Makes ``migrate`` exit with a non-zero status when unapplied migrations are
|
Makes ``migrate`` exit with a non-zero status when unapplied migrations are
|
||||||
detected.
|
detected.
|
||||||
|
|
||||||
|
@ -1519,8 +1513,6 @@ installed, ``ipdb`` is used instead.
|
||||||
|
|
||||||
.. django-admin-option:: --buffer, -b
|
.. django-admin-option:: --buffer, -b
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Discards output (``stdout`` and ``stderr``) for passing tests, in the same way
|
Discards output (``stdout`` and ``stderr``) for passing tests, in the same way
|
||||||
as :option:`unittest's --buffer option<unittest.-b>`.
|
as :option:`unittest's --buffer option<unittest.-b>`.
|
||||||
|
|
||||||
|
@ -1709,8 +1701,6 @@ Specifies the database to use. Defaults to ``default``.
|
||||||
|
|
||||||
.. django-admin-option:: --include-stale-apps
|
.. django-admin-option:: --include-stale-apps
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Deletes stale content types including ones from previously installed apps that
|
Deletes stale content types including ones from previously installed apps that
|
||||||
have been removed from :setting:`INSTALLED_APPS`. Defaults to ``False``.
|
have been removed from :setting:`INSTALLED_APPS`. Defaults to ``False``.
|
||||||
|
|
||||||
|
|
|
@ -69,11 +69,6 @@ The ``FileSystemStorage`` class
|
||||||
time of the last metadata change, and on others (like Windows), it's
|
time of the last metadata change, and on others (like Windows), it's
|
||||||
the creation time of the file.
|
the creation time of the file.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for :class:`pathlib.Path` was added to the
|
|
||||||
``FileSystemStorage.save()`` method.
|
|
||||||
|
|
||||||
The ``Storage`` class
|
The ``Storage`` class
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
|
|
|
@ -974,8 +974,6 @@ Attributes of ``BoundField``
|
||||||
|
|
||||||
.. attribute:: BoundField.widget_type
|
.. attribute:: BoundField.widget_type
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Returns the lowercased class name of the wrapped field's widget, with any
|
Returns the lowercased class name of the wrapped field's widget, with any
|
||||||
trailing ``input`` or ``widget`` removed. This may be used when building
|
trailing ``input`` or ``widget`` removed. This may be used when building
|
||||||
forms where the layout is dependent upon the widget type. For example::
|
forms where the layout is dependent upon the widget type. For example::
|
||||||
|
|
|
@ -514,14 +514,6 @@ For each field, we describe the default widget used if you don't specify
|
||||||
``DATE_INPUT_FORMATS`` keys if localization is enabled. See also
|
``DATE_INPUT_FORMATS`` keys if localization is enabled. See also
|
||||||
:doc:`format localization </topics/i18n/formatting>`.
|
:doc:`format localization </topics/i18n/formatting>`.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for ISO 8601 date string parsing (including optional timezone)
|
|
||||||
was added.
|
|
||||||
|
|
||||||
The fallback on ``DATE_INPUT_FORMATS`` in the default ``input_formats``
|
|
||||||
was added.
|
|
||||||
|
|
||||||
``DecimalField``
|
``DecimalField``
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@ -782,8 +774,6 @@ For each field, we describe the default widget used if you don't specify
|
||||||
|
|
||||||
.. class:: JSONField(encoder=None, decoder=None, **kwargs)
|
.. class:: JSONField(encoder=None, decoder=None, **kwargs)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
A field which accepts JSON encoded data for a
|
A field which accepts JSON encoded data for a
|
||||||
:class:`~django.db.models.JSONField`.
|
:class:`~django.db.models.JSONField`.
|
||||||
|
|
||||||
|
@ -1450,21 +1440,11 @@ customize the yielded 2-tuple choices.
|
||||||
:attr:`ChoiceField.choices`. The first ``value`` element is a
|
:attr:`ChoiceField.choices`. The first ``value`` element is a
|
||||||
:class:`ModelChoiceIteratorValue` instance.
|
:class:`ModelChoiceIteratorValue` instance.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
In older versions, the first ``value`` element in the choice tuple
|
|
||||||
is the ``field`` value itself, rather than a
|
|
||||||
``ModelChoiceIteratorValue`` instance. In most cases this proxies
|
|
||||||
transparently but, if you need the ``field`` value itself, use the
|
|
||||||
:attr:`ModelChoiceIteratorValue.value` attribute instead.
|
|
||||||
|
|
||||||
``ModelChoiceIteratorValue``
|
``ModelChoiceIteratorValue``
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
.. class:: ModelChoiceIteratorValue(value, instance)
|
.. class:: ModelChoiceIteratorValue(value, instance)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Two arguments are required:
|
Two arguments are required:
|
||||||
|
|
||||||
.. attribute:: value
|
.. attribute:: value
|
||||||
|
|
|
@ -336,11 +336,6 @@ foundation for custom widgets.
|
||||||
a hidden ``textarea`` element may want to always return ``False`` to
|
a hidden ``textarea`` element may want to always return ``False`` to
|
||||||
avoid browser validation on the hidden field.
|
avoid browser validation on the hidden field.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
In older versions, ``True`` was returned for
|
|
||||||
:class:`~django.forms.FileInput` when ``initial`` was set.
|
|
||||||
|
|
||||||
``MultiWidget``
|
``MultiWidget``
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
@ -372,10 +367,6 @@ foundation for custom widgets.
|
||||||
>>> widget.render('name', ['john', 'paul'])
|
>>> widget.render('name', ['john', 'paul'])
|
||||||
'<input type="text" name="name" value="john"><input type="text" name="name_last" value="paul">'
|
'<input type="text" name="name" value="john"><input type="text" name="name_last" value="paul">'
|
||||||
|
|
||||||
.. versionchanged::3.1
|
|
||||||
|
|
||||||
Support for using a dictionary was added.
|
|
||||||
|
|
||||||
And one required method:
|
And one required method:
|
||||||
|
|
||||||
.. method:: decompress(value)
|
.. method:: decompress(value)
|
||||||
|
|
|
@ -58,10 +58,6 @@ specifies the check you want the constraint to enforce.
|
||||||
For example, ``CheckConstraint(check=Q(age__gte=18), name='age_gte_18')``
|
For example, ``CheckConstraint(check=Q(age__gte=18), name='age_gte_18')``
|
||||||
ensures the age field is never less than 18.
|
ensures the age field is never less than 18.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for boolean :class:`~django.db.models.Expression` was added.
|
|
||||||
|
|
||||||
``name``
|
``name``
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -119,8 +115,6 @@ These conditions have the same database restrictions as
|
||||||
|
|
||||||
.. attribute:: UniqueConstraint.deferrable
|
.. attribute:: UniqueConstraint.deferrable
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Set this parameter to create a deferrable unique constraint. Accepted values
|
Set this parameter to create a deferrable unique constraint. Accepted values
|
||||||
are ``Deferrable.DEFERRED`` or ``Deferrable.IMMEDIATE``. For example::
|
are ``Deferrable.DEFERRED`` or ``Deferrable.IMMEDIATE``. For example::
|
||||||
|
|
||||||
|
|
|
@ -336,8 +336,6 @@ Usage example::
|
||||||
|
|
||||||
.. class:: ExtractIsoWeekDay(expression, tzinfo=None, **extra)
|
.. class:: ExtractIsoWeekDay(expression, tzinfo=None, **extra)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Returns the ISO-8601 week day with day 1 being Monday and day 7 being
|
Returns the ISO-8601 week day with day 1 being Monday and day 7 being
|
||||||
Sunday.
|
Sunday.
|
||||||
|
|
||||||
|
|
|
@ -842,10 +842,6 @@ Has two optional arguments:
|
||||||
handles the storage and retrieval of your files. See :doc:`/topics/files`
|
handles the storage and retrieval of your files. See :doc:`/topics/files`
|
||||||
for details on how to provide this object.
|
for details on how to provide this object.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The ability to provide a callable was added.
|
|
||||||
|
|
||||||
The default form widget for this field is a
|
The default form widget for this field is a
|
||||||
:class:`~django.forms.ClearableFileInput`.
|
:class:`~django.forms.ClearableFileInput`.
|
||||||
|
|
||||||
|
@ -1198,8 +1194,6 @@ values are stored as null.
|
||||||
|
|
||||||
.. class:: JSONField(encoder=None, decoder=None, **options)
|
.. class:: JSONField(encoder=None, decoder=None, **options)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
A field for storing JSON encoded data. In Python the data is represented in its
|
A field for storing JSON encoded data. In Python the data is represented in its
|
||||||
Python native format: dictionaries, lists, strings, numbers, booleans and
|
Python native format: dictionaries, lists, strings, numbers, booleans and
|
||||||
``None``.
|
``None``.
|
||||||
|
@ -1276,8 +1270,6 @@ Like :class:`BooleanField` with ``null=True``.
|
||||||
|
|
||||||
.. class:: PositiveBigIntegerField(**options)
|
.. class:: PositiveBigIntegerField(**options)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Like a :class:`PositiveIntegerField`, but only allows values under a certain
|
Like a :class:`PositiveIntegerField`, but only allows values under a certain
|
||||||
(database-dependent) point. Values from ``0`` to ``9223372036854775807`` are
|
(database-dependent) point. Values from ``0`` to ``9223372036854775807`` are
|
||||||
safe in all databases supported by Django.
|
safe in all databases supported by Django.
|
||||||
|
@ -1579,8 +1571,6 @@ The possible values for :attr:`~ForeignKey.on_delete` are found in
|
||||||
|
|
||||||
* .. attribute:: RESTRICT
|
* .. attribute:: RESTRICT
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Prevent deletion of the referenced object by raising
|
Prevent deletion of the referenced object by raising
|
||||||
:exc:`~django.db.models.RestrictedError` (a subclass of
|
:exc:`~django.db.models.RestrictedError` (a subclass of
|
||||||
:exc:`django.db.IntegrityError`). Unlike :attr:`PROTECT`, deletion of the
|
:exc:`django.db.IntegrityError`). Unlike :attr:`PROTECT`, deletion of the
|
||||||
|
|
|
@ -803,11 +803,6 @@ For example::
|
||||||
>>> p.get_shirt_size_display()
|
>>> p.get_shirt_size_display()
|
||||||
'Large'
|
'Large'
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for :class:`~django.contrib.postgres.fields.ArrayField` and
|
|
||||||
:class:`~django.contrib.postgres.fields.RangeField` was added.
|
|
||||||
|
|
||||||
.. method:: Model.get_next_by_FOO(**kwargs)
|
.. method:: Model.get_next_by_FOO(**kwargs)
|
||||||
.. method:: Model.get_previous_by_FOO(**kwargs)
|
.. method:: Model.get_previous_by_FOO(**kwargs)
|
||||||
|
|
||||||
|
|
|
@ -834,10 +834,6 @@ object. If it's ``None``, Django uses the :ref:`current time zone
|
||||||
ambiguous datetimes in daylight saving time. By default (when ``is_dst=None``),
|
ambiguous datetimes in daylight saving time. By default (when ``is_dst=None``),
|
||||||
``pytz`` raises an exception for such datetimes.
|
``pytz`` raises an exception for such datetimes.
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
The ``is_dst`` parameter was added.
|
|
||||||
|
|
||||||
.. _database-time-zone-definitions:
|
.. _database-time-zone-definitions:
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
@ -2216,10 +2212,6 @@ normally supports it).
|
||||||
|
|
||||||
Returns ``objs`` as cast to a list, in the same order as provided.
|
Returns ``objs`` as cast to a list, in the same order as provided.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for the fetching primary key attributes on MariaDB 10.5+ was added.
|
|
||||||
|
|
||||||
``bulk_update()``
|
``bulk_update()``
|
||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -2742,11 +2734,6 @@ adverse effects on your database. For example, the ``ANALYZE`` flag supported
|
||||||
by MariaDB, MySQL 8.0.18+, and PostgreSQL could result in changes to data if
|
by MariaDB, MySQL 8.0.18+, and PostgreSQL could result in changes to data if
|
||||||
there are triggers or if a function is called, even for a ``SELECT`` query.
|
there are triggers or if a function is called, even for a ``SELECT`` query.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for the ``'TREE'`` format on MySQL 8.0.16+ and ``analyze`` option
|
|
||||||
on MariaDB and MySQL 8.0.18+ were added.
|
|
||||||
|
|
||||||
.. _field-lookups:
|
.. _field-lookups:
|
||||||
|
|
||||||
``Field`` lookups
|
``Field`` lookups
|
||||||
|
@ -3273,8 +3260,6 @@ in the database <database-time-zone-definitions>`.
|
||||||
``iso_week_day``
|
``iso_week_day``
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
For date and datetime fields, an exact ISO 8601 day of the week match. Allows
|
For date and datetime fields, an exact ISO 8601 day of the week match. Allows
|
||||||
chaining additional field lookups.
|
chaining additional field lookups.
|
||||||
|
|
||||||
|
|
|
@ -75,10 +75,6 @@ Related objects reference
|
||||||
dictionary and they will be evaluated once before creating any
|
dictionary and they will be evaluated once before creating any
|
||||||
intermediate instance(s).
|
intermediate instance(s).
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
``through_defaults`` values can now be callables.
|
|
||||||
|
|
||||||
.. method:: create(through_defaults=None, **kwargs)
|
.. method:: create(through_defaults=None, **kwargs)
|
||||||
|
|
||||||
Creates a new object, saves it and puts it in the related object set.
|
Creates a new object, saves it and puts it in the related object set.
|
||||||
|
@ -114,10 +110,6 @@ Related objects reference
|
||||||
needed. You can use callables as values in the ``through_defaults``
|
needed. You can use callables as values in the ``through_defaults``
|
||||||
dictionary.
|
dictionary.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
``through_defaults`` values can now be callables.
|
|
||||||
|
|
||||||
.. method:: remove(*objs, bulk=True)
|
.. method:: remove(*objs, bulk=True)
|
||||||
|
|
||||||
Removes the specified model objects from the related object set::
|
Removes the specified model objects from the related object set::
|
||||||
|
@ -208,10 +200,6 @@ Related objects reference
|
||||||
dictionary and they will be evaluated once before creating any
|
dictionary and they will be evaluated once before creating any
|
||||||
intermediate instance(s).
|
intermediate instance(s).
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
``through_defaults`` values can now be callables.
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Note that ``add()``, ``create()``, ``remove()``, ``clear()``, and
|
Note that ``add()``, ``create()``, ``remove()``, ``clear()``, and
|
||||||
|
|
|
@ -17,10 +17,6 @@ classes live in :source:`django/core/paginator.py`.
|
||||||
A paginator acts like a sequence of :class:`Page` when using ``len()`` or
|
A paginator acts like a sequence of :class:`Page` when using ``len()`` or
|
||||||
iterating it directly.
|
iterating it directly.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for iterating over ``Paginator`` was added.
|
|
||||||
|
|
||||||
.. attribute:: Paginator.object_list
|
.. attribute:: Paginator.object_list
|
||||||
|
|
||||||
Required. A list, tuple, ``QuerySet``, or other sliceable object with a
|
Required. A list, tuple, ``QuerySet``, or other sliceable object with a
|
||||||
|
|
|
@ -406,8 +406,6 @@ Methods
|
||||||
|
|
||||||
.. method:: HttpRequest.accepts(mime_type)
|
.. method:: HttpRequest.accepts(mime_type)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Returns ``True`` if the request ``Accept`` header matches the ``mime_type``
|
Returns ``True`` if the request ``Accept`` header matches the ``mime_type``
|
||||||
argument::
|
argument::
|
||||||
|
|
||||||
|
@ -911,10 +909,6 @@ Methods
|
||||||
.. _HttpOnly: https://owasp.org/www-community/HttpOnly
|
.. _HttpOnly: https://owasp.org/www-community/HttpOnly
|
||||||
.. _SameSite: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
|
.. _SameSite: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Using ``samesite='None'`` (string) was allowed.
|
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
:rfc:`RFC 6265 <6265#section-6.1>` states that user agents should
|
:rfc:`RFC 6265 <6265#section-6.1>` states that user agents should
|
||||||
|
@ -932,10 +926,6 @@ Methods
|
||||||
you will need to remember to pass it to the corresponding
|
you will need to remember to pass it to the corresponding
|
||||||
:meth:`HttpRequest.get_signed_cookie` call.
|
:meth:`HttpRequest.get_signed_cookie` call.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Using ``samesite='None'`` (string) was allowed.
|
|
||||||
|
|
||||||
.. method:: HttpResponse.delete_cookie(key, path='/', domain=None, samesite=None)
|
.. method:: HttpResponse.delete_cookie(key, path='/', domain=None, samesite=None)
|
||||||
|
|
||||||
Deletes the cookie with the given key. Fails silently if the key doesn't
|
Deletes the cookie with the given key. Fails silently if the key doesn't
|
||||||
|
@ -945,10 +935,6 @@ Methods
|
||||||
values you used in ``set_cookie()`` -- otherwise the cookie may not be
|
values you used in ``set_cookie()`` -- otherwise the cookie may not be
|
||||||
deleted.
|
deleted.
|
||||||
|
|
||||||
.. versionchanged:: 2.2.15
|
|
||||||
|
|
||||||
The ``samesite`` argument was added.
|
|
||||||
|
|
||||||
.. method:: HttpResponse.close()
|
.. method:: HttpResponse.close()
|
||||||
|
|
||||||
This method is called at the end of the request directly by the WSGI
|
This method is called at the end of the request directly by the WSGI
|
||||||
|
|
|
@ -99,11 +99,6 @@ This validation only applies via :meth:`~django.http.HttpRequest.get_host()`;
|
||||||
if your code accesses the ``Host`` header directly from ``request.META`` you
|
if your code accesses the ``Host`` header directly from ``request.META`` you
|
||||||
are bypassing this security protection.
|
are bypassing this security protection.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
If ``ALLOWED_HOSTS`` is empty and ``DEBUG=True``, subdomains of localhost
|
|
||||||
were allowed.
|
|
||||||
|
|
||||||
.. setting:: APPEND_SLASH
|
.. setting:: APPEND_SLASH
|
||||||
|
|
||||||
``APPEND_SLASH``
|
``APPEND_SLASH``
|
||||||
|
@ -387,10 +382,6 @@ cookie from being sent in cross-site requests.
|
||||||
|
|
||||||
See :setting:`SESSION_COOKIE_SAMESITE` for details about ``SameSite``.
|
See :setting:`SESSION_COOKIE_SAMESITE` for details about ``SameSite``.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Setting ``CSRF_COOKIE_SAMESITE = 'None'`` was allowed.
|
|
||||||
|
|
||||||
.. setting:: CSRF_COOKIE_SECURE
|
.. setting:: CSRF_COOKIE_SECURE
|
||||||
|
|
||||||
``CSRF_COOKIE_SECURE``
|
``CSRF_COOKIE_SECURE``
|
||||||
|
@ -688,10 +679,6 @@ When :setting:`USE_TZ` is ``False``, it is an error to set this option.
|
||||||
Consider converting to local time explicitly with ``AT TIME ZONE`` in raw SQL
|
Consider converting to local time explicitly with ``AT TIME ZONE`` in raw SQL
|
||||||
queries instead of setting the ``TIME_ZONE`` option.
|
queries instead of setting the ``TIME_ZONE`` option.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Using this option when the database backend supports time zones was allowed.
|
|
||||||
|
|
||||||
.. setting:: DATABASE-DISABLE_SERVER_SIDE_CURSORS
|
.. setting:: DATABASE-DISABLE_SERVER_SIDE_CURSORS
|
||||||
|
|
||||||
``DISABLE_SERVER_SIDE_CURSORS``
|
``DISABLE_SERVER_SIDE_CURSORS``
|
||||||
|
@ -786,8 +773,6 @@ on :ref:`controlling the creation order of test databases
|
||||||
``MIGRATE``
|
``MIGRATE``
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Default: ``True``
|
Default: ``True``
|
||||||
|
|
||||||
When set to ``False``, migrations won't run when creating the test database.
|
When set to ``False``, migrations won't run when creating the test database.
|
||||||
|
@ -1161,10 +1146,6 @@ precedence and will be applied instead.
|
||||||
|
|
||||||
See also :setting:`DATE_INPUT_FORMATS` and :setting:`TIME_INPUT_FORMATS`.
|
See also :setting:`DATE_INPUT_FORMATS` and :setting:`TIME_INPUT_FORMATS`.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
In older versions, the default is a list containing also date-only formats.
|
|
||||||
|
|
||||||
.. setting:: DEBUG
|
.. setting:: DEBUG
|
||||||
|
|
||||||
``DEBUG``
|
``DEBUG``
|
||||||
|
@ -1272,8 +1253,6 @@ manually specified. Used when constructing the ``Content-Type`` header.
|
||||||
``DEFAULT_EXCEPTION_REPORTER``
|
``DEFAULT_EXCEPTION_REPORTER``
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Default: ``'``:class:`django.views.debug.ExceptionReporter`\ ``'``
|
Default: ``'``:class:`django.views.debug.ExceptionReporter`\ ``'``
|
||||||
|
|
||||||
Default exception reporter class to be used if none has been assigned to the
|
Default exception reporter class to be used if none has been assigned to the
|
||||||
|
@ -1317,8 +1296,6 @@ and :setting:`MANAGERS`; for that, see :setting:`SERVER_EMAIL`.
|
||||||
``DEFAULT_HASHING_ALGORITHM``
|
``DEFAULT_HASHING_ALGORITHM``
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Default: ``'sha256'``
|
Default: ``'sha256'``
|
||||||
|
|
||||||
Default hashing algorithm to use for encoding cookies, password reset tokens in
|
Default hashing algorithm to use for encoding cookies, password reset tokens in
|
||||||
|
@ -1385,10 +1362,6 @@ Default: Not defined
|
||||||
The directory used by the :ref:`file email backend <topic-email-file-backend>`
|
The directory used by the :ref:`file email backend <topic-email-file-backend>`
|
||||||
to store output files.
|
to store output files.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for :class:`pathlib.Path` was added.
|
|
||||||
|
|
||||||
.. setting:: EMAIL_HOST
|
.. setting:: EMAIL_HOST
|
||||||
|
|
||||||
``EMAIL_HOST``
|
``EMAIL_HOST``
|
||||||
|
@ -1910,10 +1883,6 @@ cookie from being sent in cross-site requests.
|
||||||
|
|
||||||
See :setting:`SESSION_COOKIE_SAMESITE` for details about ``SameSite``.
|
See :setting:`SESSION_COOKIE_SAMESITE` for details about ``SameSite``.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Setting ``LANGUAGE_COOKIE_SAMESITE = 'None'`` was allowed.
|
|
||||||
|
|
||||||
.. setting:: LANGUAGE_COOKIE_SECURE
|
.. setting:: LANGUAGE_COOKIE_SECURE
|
||||||
|
|
||||||
``LANGUAGE_COOKIE_SECURE``
|
``LANGUAGE_COOKIE_SECURE``
|
||||||
|
@ -2422,10 +2391,6 @@ If configured, the :class:`~django.middleware.security.SecurityMiddleware` sets
|
||||||
the :ref:`referrer-policy` header on all responses that do not already have it
|
the :ref:`referrer-policy` header on all responses that do not already have it
|
||||||
to the value provided.
|
to the value provided.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
In older versions, the default value is ``None``.
|
|
||||||
|
|
||||||
.. setting:: SECURE_SSL_HOST
|
.. setting:: SECURE_SSL_HOST
|
||||||
|
|
||||||
``SECURE_SSL_HOST``
|
``SECURE_SSL_HOST``
|
||||||
|
@ -2986,8 +2951,6 @@ rendered.
|
||||||
``PASSWORD_RESET_TIMEOUT``
|
``PASSWORD_RESET_TIMEOUT``
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Default: ``259200`` (3 days, in seconds)
|
Default: ``259200`` (3 days, in seconds)
|
||||||
|
|
||||||
The number of seconds a password reset link is valid for.
|
The number of seconds a password reset link is valid for.
|
||||||
|
@ -3267,10 +3230,6 @@ Possible values for the setting are:
|
||||||
Modern browsers provide a more secure default policy for the ``SameSite``
|
Modern browsers provide a more secure default policy for the ``SameSite``
|
||||||
flag and will assume ``Lax`` for cookies without an explicit value set.
|
flag and will assume ``Lax`` for cookies without an explicit value set.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Setting ``SESSION_COOKIE_SAMESITE = 'None'`` was allowed.
|
|
||||||
|
|
||||||
.. _SameSite: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
|
.. _SameSite: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
|
||||||
|
|
||||||
.. setting:: SESSION_COOKIE_SECURE
|
.. setting:: SESSION_COOKIE_SECURE
|
||||||
|
|
|
@ -729,10 +729,6 @@ available to the included template::
|
||||||
been evaluated and rendered* - not blocks that can be overridden by, for
|
been evaluated and rendered* - not blocks that can be overridden by, for
|
||||||
example, an extending template.
|
example, an extending template.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for iterables of template names was added.
|
|
||||||
|
|
||||||
.. templatetag:: load
|
.. templatetag:: load
|
||||||
|
|
||||||
``load``
|
``load``
|
||||||
|
@ -1747,11 +1743,6 @@ example, when the active locale is ``en`` (English):
|
||||||
Using ``floatformat`` with no argument is equivalent to using ``floatformat``
|
Using ``floatformat`` with no argument is equivalent to using ``floatformat``
|
||||||
with an argument of ``-1``.
|
with an argument of ``-1``.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
In older versions, a negative zero ``-0`` was returned for negative numbers
|
|
||||||
which round to zero.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.2
|
.. versionchanged:: 3.2
|
||||||
|
|
||||||
The ``g`` suffix to force grouping by thousand separators was added.
|
The ``g`` suffix to force grouping by thousand separators was added.
|
||||||
|
|
|
@ -43,11 +43,6 @@ need to distinguish caches by the ``Accept-language`` header.
|
||||||
* All other parameters are added with their value, after applying
|
* All other parameters are added with their value, after applying
|
||||||
``str()`` to it.
|
``str()`` to it.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for multiple field names in the ``no-cache`` directive was
|
|
||||||
added.
|
|
||||||
|
|
||||||
.. function:: get_max_age(response)
|
.. function:: get_max_age(response)
|
||||||
|
|
||||||
Returns the max-age from the response Cache-Control header as an integer
|
Returns the max-age from the response Cache-Control header as an integer
|
||||||
|
@ -131,10 +126,6 @@ The functions defined in this module share the following properties:
|
||||||
UTC offsets aren't supported; if ``value`` describes one, the result is
|
UTC offsets aren't supported; if ``value`` describes one, the result is
|
||||||
``None``.
|
``None``.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for comma separators for milliseconds was added.
|
|
||||||
|
|
||||||
.. function:: parse_datetime(value)
|
.. function:: parse_datetime(value)
|
||||||
|
|
||||||
Parses a string and returns a :class:`datetime.datetime`.
|
Parses a string and returns a :class:`datetime.datetime`.
|
||||||
|
@ -142,10 +133,6 @@ The functions defined in this module share the following properties:
|
||||||
UTC offsets are supported; if ``value`` describes one, the result's
|
UTC offsets are supported; if ``value`` describes one, the result's
|
||||||
``tzinfo`` attribute is a :class:`datetime.timezone` instance.
|
``tzinfo`` attribute is a :class:`datetime.timezone` instance.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for comma separators for milliseconds was added.
|
|
||||||
|
|
||||||
.. function:: parse_duration(value)
|
.. function:: parse_duration(value)
|
||||||
|
|
||||||
Parses a string and returns a :class:`datetime.timedelta`.
|
Parses a string and returns a :class:`datetime.timedelta`.
|
||||||
|
@ -155,11 +142,6 @@ The functions defined in this module share the following properties:
|
||||||
``P4DT1H15M20S`` which is equivalent to ``4 1:15:20``) or PostgreSQL's
|
``P4DT1H15M20S`` which is equivalent to ``4 1:15:20``) or PostgreSQL's
|
||||||
day-time interval format (e.g. ``3 days 04:05:06``).
|
day-time interval format (e.g. ``3 days 04:05:06``).
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for comma separators for decimal fractions in the ISO 8601
|
|
||||||
format and for the format ``"DD HH:MM:SS,uuuuuu"`` was added.
|
|
||||||
|
|
||||||
``django.utils.decorators``
|
``django.utils.decorators``
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
@ -204,24 +186,18 @@ The functions defined in this module share the following properties:
|
||||||
|
|
||||||
.. function:: sync_only_middleware(middleware)
|
.. function:: sync_only_middleware(middleware)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Marks a middleware as :ref:`synchronous-only <async-middleware>`. (The
|
Marks a middleware as :ref:`synchronous-only <async-middleware>`. (The
|
||||||
default in Django, but this allows you to future-proof if the default ever
|
default in Django, but this allows you to future-proof if the default ever
|
||||||
changes in a future release.)
|
changes in a future release.)
|
||||||
|
|
||||||
.. function:: async_only_middleware(middleware)
|
.. function:: async_only_middleware(middleware)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Marks a middleware as :ref:`asynchronous-only <async-middleware>`. Django
|
Marks a middleware as :ref:`asynchronous-only <async-middleware>`. Django
|
||||||
will wrap it in an asynchronous event loop when it is called from the WSGI
|
will wrap it in an asynchronous event loop when it is called from the WSGI
|
||||||
request path.
|
request path.
|
||||||
|
|
||||||
.. function:: sync_and_async_middleware(middleware)
|
.. function:: sync_and_async_middleware(middleware)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Marks a middleware as :ref:`sync and async compatible <async-middleware>`,
|
Marks a middleware as :ref:`sync and async compatible <async-middleware>`,
|
||||||
this allows to avoid converting requests. You must implement detection of
|
this allows to avoid converting requests. You must implement detection of
|
||||||
the current request type to use this decorator. See :ref:`asynchronous
|
the current request type to use this decorator. See :ref:`asynchronous
|
||||||
|
@ -321,10 +297,6 @@ The functions defined in this module share the following properties:
|
||||||
|
|
||||||
Returns an ASCII string containing the encoded result.
|
Returns an ASCII string containing the encoded result.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for :class:`pathlib.Path` ``path`` was added.
|
|
||||||
|
|
||||||
.. function:: escape_uri_path(path)
|
.. function:: escape_uri_path(path)
|
||||||
|
|
||||||
Escapes the unsafe characters from the path portion of a Uniform Resource
|
Escapes the unsafe characters from the path portion of a Uniform Resource
|
||||||
|
@ -550,8 +522,6 @@ https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004
|
||||||
|
|
||||||
.. class:: classproperty(method=None)
|
.. class:: classproperty(method=None)
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Similar to :py:func:`@classmethod <classmethod>`, the ``@classproperty``
|
Similar to :py:func:`@classmethod <classmethod>`, the ``@classproperty``
|
||||||
decorator converts the result of a method with a single ``cls`` argument
|
decorator converts the result of a method with a single ``cls`` argument
|
||||||
into a property that can be accessed directly from the class.
|
into a property that can be accessed directly from the class.
|
||||||
|
|
|
@ -16,15 +16,9 @@ You can expect to see this in future releases. For now, you can use the
|
||||||
There is also a whole range of async-native Python libraries that you can
|
There is also a whole range of async-native Python libraries that you can
|
||||||
integrate with.
|
integrate with.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for async views was added.
|
|
||||||
|
|
||||||
Async views
|
Async views
|
||||||
===========
|
===========
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Any view can be declared async by making the callable part of it return a
|
Any view can be declared async by making the callable part of it return a
|
||||||
coroutine - commonly, this is done using ``async def``. For a function-based
|
coroutine - commonly, this is done using ``async def``. For a function-based
|
||||||
view, this means declaring the whole view using ``async def``. For a
|
view, this means declaring the whole view using ``async def``. For a
|
||||||
|
|
|
@ -705,10 +705,6 @@ The following attributes and methods are available on any subclass of
|
||||||
Returns an HMAC of the password field. Used for
|
Returns an HMAC of the password field. Used for
|
||||||
:ref:`session-invalidation-on-password-change`.
|
:ref:`session-invalidation-on-password-change`.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The hashing algorithm was changed to the SHA-256.
|
|
||||||
|
|
||||||
:class:`~models.AbstractUser` subclasses :class:`~models.AbstractBaseUser`:
|
:class:`~models.AbstractUser` subclasses :class:`~models.AbstractBaseUser`:
|
||||||
|
|
||||||
.. class:: models.AbstractUser
|
.. class:: models.AbstractUser
|
||||||
|
|
|
@ -429,10 +429,6 @@ from the ``User`` model.
|
||||||
hasher. If the password argument is ``None``, an unusable password is
|
hasher. If the password argument is ``None``, an unusable password is
|
||||||
returned (one that will never be accepted by :func:`check_password`).
|
returned (one that will never be accepted by :func:`check_password`).
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The ``password`` parameter must be a string or bytes if not ``None``.
|
|
||||||
|
|
||||||
.. function:: is_password_usable(encoded_password)
|
.. function:: is_password_usable(encoded_password)
|
||||||
|
|
||||||
Returns ``False`` if the password is a result of
|
Returns ``False`` if the password is a result of
|
||||||
|
|
|
@ -628,11 +628,6 @@ Additionally, ``cache_page`` automatically sets ``Cache-Control`` and
|
||||||
``Expires`` headers in the response which affect :ref:`downstream caches
|
``Expires`` headers in the response which affect :ref:`downstream caches
|
||||||
<downstream-caches>`.
|
<downstream-caches>`.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
In older versions, the ``max-age`` directive from the ``Cache-Control``
|
|
||||||
header had precedence over the cache timeout set by ``cache_page``.
|
|
||||||
|
|
||||||
Specifying per-view cache in the URLconf
|
Specifying per-view cache in the URLconf
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
|
@ -930,10 +925,6 @@ particular object::
|
||||||
``delete()`` returns ``True`` if the key was successfully deleted, ``False``
|
``delete()`` returns ``True`` if the key was successfully deleted, ``False``
|
||||||
otherwise.
|
otherwise.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The boolean return value was added.
|
|
||||||
|
|
||||||
.. method:: cache.delete_many(keys, version=None)
|
.. method:: cache.delete_many(keys, version=None)
|
||||||
|
|
||||||
If you want to clear a bunch of keys at once, ``delete_many()`` can take a list
|
If you want to clear a bunch of keys at once, ``delete_many()`` can take a list
|
||||||
|
|
|
@ -665,10 +665,6 @@ The ``F()`` objects support bitwise operations by ``.bitand()``, ``.bitor()``,
|
||||||
|
|
||||||
Oracle doesn't support bitwise XOR operation.
|
Oracle doesn't support bitwise XOR operation.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for ``.bitxor()`` was added.
|
|
||||||
|
|
||||||
.. _using-transforms-in-expressions:
|
.. _using-transforms-in-expressions:
|
||||||
|
|
||||||
Expressions can reference transforms
|
Expressions can reference transforms
|
||||||
|
|
|
@ -529,10 +529,6 @@ To specify this backend, put the following in your settings::
|
||||||
This backend is not intended for use in production -- it is provided as a
|
This backend is not intended for use in production -- it is provided as a
|
||||||
convenience that can be used during development.
|
convenience that can be used during development.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for :class:`pathlib.Path` was added.
|
|
||||||
|
|
||||||
.. _topic-email-memory-backend:
|
.. _topic-email-memory-backend:
|
||||||
|
|
||||||
In-memory backend
|
In-memory backend
|
||||||
|
|
|
@ -206,8 +206,6 @@ you can pass them in as the ``storage`` argument to a
|
||||||
Using a callable
|
Using a callable
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
You can use a callable as the :attr:`~django.db.models.FileField.storage`
|
You can use a callable as the :attr:`~django.db.models.FileField.storage`
|
||||||
parameter for :class:`~django.db.models.FileField` or
|
parameter for :class:`~django.db.models.FileField` or
|
||||||
:class:`~django.db.models.ImageField`. This allows you to modify the used
|
:class:`~django.db.models.ImageField`. This allows you to modify the used
|
||||||
|
|
|
@ -291,8 +291,6 @@ object with a :attr:`~django.http.HttpResponse.status_code` of 404.
|
||||||
Asynchronous support
|
Asynchronous support
|
||||||
====================
|
====================
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
Middleware can support any combination of synchronous and asynchronous
|
Middleware can support any combination of synchronous and asynchronous
|
||||||
requests. Django will adapt requests to fit the middleware's requirements if it
|
requests. Django will adapt requests to fit the middleware's requirements if it
|
||||||
cannot support both, but at a performance penalty.
|
cannot support both, but at a performance penalty.
|
||||||
|
@ -423,7 +421,3 @@ These are the behavioral differences between using :setting:`MIDDLEWARE` and
|
||||||
HTTP response, and then the next middleware in line will see that
|
HTTP response, and then the next middleware in line will see that
|
||||||
response. Middleware are never skipped due to a middleware raising an
|
response. Middleware are never skipped due to a middleware raising an
|
||||||
exception.
|
exception.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for asynchronous requests was added to the ``MiddlewareMixin``.
|
|
||||||
|
|
|
@ -157,10 +157,6 @@ A converter is a class that includes the following:
|
||||||
and as a consequence :func:`~django.urls.reverse` will raise
|
and as a consequence :func:`~django.urls.reverse` will raise
|
||||||
:class:`~django.urls.NoReverseMatch` unless another URL pattern matches.
|
:class:`~django.urls.NoReverseMatch` unless another URL pattern matches.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
Support for raising ``ValueError`` to indicate no match was added.
|
|
||||||
|
|
||||||
For example::
|
For example::
|
||||||
|
|
||||||
class FourDigitYearConverter:
|
class FourDigitYearConverter:
|
||||||
|
|
|
@ -208,8 +208,6 @@ in a test view. For example::
|
||||||
Async views
|
Async views
|
||||||
===========
|
===========
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
As well as being synchronous functions, views can also be asynchronous
|
As well as being synchronous functions, views can also be asynchronous
|
||||||
("async") functions, normally defined using Python's ``async def`` syntax.
|
("async") functions, normally defined using Python's ``async def`` syntax.
|
||||||
Django will automatically detect these and run them in an async context.
|
Django will automatically detect these and run them in an async context.
|
||||||
|
|
|
@ -272,10 +272,6 @@ In a case like this, consider something like the following::
|
||||||
|
|
||||||
a format specification for argument 'name', as in 'msgstr[0]', doesn't exist in 'msgid'
|
a format specification for argument 'name', as in 'msgstr[0]', doesn't exist in 'msgid'
|
||||||
|
|
||||||
.. versionchanged: 2.2.12
|
|
||||||
|
|
||||||
Added support for different plural equations in ``.po`` files.
|
|
||||||
|
|
||||||
.. _contextual-markers:
|
.. _contextual-markers:
|
||||||
|
|
||||||
Contextual markers
|
Contextual markers
|
||||||
|
@ -626,11 +622,6 @@ using the ``context`` keyword:
|
||||||
|
|
||||||
{% translate "May" context "month name" %}
|
{% translate "May" context "month name" %}
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The ``trans`` tag was renamed to ``translate``. The ``trans``
|
|
||||||
tag is still supported as an alias for backwards compatibility.
|
|
||||||
|
|
||||||
.. templatetag:: blocktrans
|
.. templatetag:: blocktrans
|
||||||
.. templatetag:: blocktranslate
|
.. templatetag:: blocktranslate
|
||||||
|
|
||||||
|
@ -749,11 +740,6 @@ will result in the entry ``"First sentence. Second paragraph."`` in the PO file,
|
||||||
compared to ``"\n First sentence.\n Second paragraph.\n"``, if the
|
compared to ``"\n First sentence.\n Second paragraph.\n"``, if the
|
||||||
``trimmed`` option had not been specified.
|
``trimmed`` option had not been specified.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The ``blocktrans`` tag was renamed to ``blocktranslate``. The ``blocktrans``
|
|
||||||
tag is still supported as an alias for backwards compatibility.
|
|
||||||
|
|
||||||
String literals passed to tags and filters
|
String literals passed to tags and filters
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
||||||
|
@ -1817,12 +1803,6 @@ set, to ``/``, depending on the nature of the request:
|
||||||
the ``next`` parameter was set. Otherwise a 204 status code (No Content) will
|
the ``next`` parameter was set. Otherwise a 204 status code (No Content) will
|
||||||
be returned.
|
be returned.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
In older versions, the distinction for the fallback is based on whether the
|
|
||||||
``X-Requested-With`` header is set to the value ``XMLHttpRequest``. This is
|
|
||||||
set by the jQuery ``ajax()`` method.
|
|
||||||
|
|
||||||
Here's example HTML template code:
|
Here's example HTML template code:
|
||||||
|
|
||||||
.. code-block:: html+django
|
.. code-block:: html+django
|
||||||
|
|
|
@ -277,11 +277,6 @@ function::
|
||||||
Also note that GeoDjango provides a :doc:`customized GeoJSON serializer
|
Also note that GeoDjango provides a :doc:`customized GeoJSON serializer
|
||||||
</ref/contrib/gis/serializers>`.
|
</ref/contrib/gis/serializers>`.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
All data is now dumped with Unicode. If you need the previous behavior,
|
|
||||||
pass ``ensure_ascii=True`` to the ``serializers.serialize()`` function.
|
|
||||||
|
|
||||||
``DjangoJSONEncoder``
|
``DjangoJSONEncoder``
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -341,11 +336,6 @@ again a mapping with the key being name of the field and the value the value::
|
||||||
|
|
||||||
Referential fields are again represented by the PK or sequence of PKs.
|
Referential fields are again represented by the PK or sequence of PKs.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
All data is now dumped with Unicode. If you need the previous behavior,
|
|
||||||
pass ``allow_unicode=False`` to the ``serializers.serialize()`` function.
|
|
||||||
|
|
||||||
.. _topics-serialization-natural-keys:
|
.. _topics-serialization-natural-keys:
|
||||||
|
|
||||||
Natural keys
|
Natural keys
|
||||||
|
|
|
@ -101,10 +101,6 @@ generate signatures. You can use a different secret by passing it to the
|
||||||
and underscores. ``algorithm`` must be an algorithm supported by
|
and underscores. ``algorithm`` must be an algorithm supported by
|
||||||
:py:mod:`hashlib`, it defaults to ``'sha256'``.
|
:py:mod:`hashlib`, it defaults to ``'sha256'``.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The ``algorithm`` parameter was added.
|
|
||||||
|
|
||||||
.. versionchanged:: 3.2
|
.. versionchanged:: 3.2
|
||||||
|
|
||||||
The ``sign_object()`` and ``unsign_object()`` methods were added.
|
The ``sign_object()`` and ``unsign_object()`` methods were added.
|
||||||
|
@ -197,10 +193,6 @@ created within a specified period of time::
|
||||||
otherwise raises ``SignatureExpired``. The ``max_age`` parameter can
|
otherwise raises ``SignatureExpired``. The ``max_age`` parameter can
|
||||||
accept an integer or a :py:class:`datetime.timedelta` object.
|
accept an integer or a :py:class:`datetime.timedelta` object.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The ``algorithm`` parameter was added.
|
|
||||||
|
|
||||||
.. _signing-complex-data:
|
.. _signing-complex-data:
|
||||||
|
|
||||||
Protecting complex data structures
|
Protecting complex data structures
|
||||||
|
|
|
@ -573,10 +573,6 @@ execute and tear down the test suite.
|
||||||
custom arguments by calling ``parser.add_argument()`` inside the method, so
|
custom arguments by calling ``parser.add_argument()`` inside the method, so
|
||||||
that the :djadmin:`test` command will be able to use those arguments.
|
that the :djadmin:`test` command will be able to use those arguments.
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
The ``buffer`` argument was added.
|
|
||||||
|
|
||||||
.. versionadded:: 3.2
|
.. versionadded:: 3.2
|
||||||
|
|
||||||
The ``enable_faulthandler`` and ``timing`` arguments were added.
|
The ``enable_faulthandler`` and ``timing`` arguments were added.
|
||||||
|
@ -671,10 +667,6 @@ Methods
|
||||||
|
|
||||||
Runs the :doc:`system checks </topics/checks>` on the test ``databases``.
|
Runs the :doc:`system checks </topics/checks>` on the test ``databases``.
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
The ``databases`` parameter was added.
|
|
||||||
|
|
||||||
.. method:: DiscoverRunner.run_suite(suite, **kwargs)
|
.. method:: DiscoverRunner.run_suite(suite, **kwargs)
|
||||||
|
|
||||||
Runs the test suite.
|
Runs the test suite.
|
||||||
|
|
|
@ -769,11 +769,6 @@ If your tests make any database queries, use subclasses
|
||||||
:exc:`unittest.SkipTest` in ``setUpClass()``, be sure to do it before
|
:exc:`unittest.SkipTest` in ``setUpClass()``, be sure to do it before
|
||||||
calling ``super()`` to avoid this.
|
calling ``super()`` to avoid this.
|
||||||
|
|
||||||
.. versionchanged:: 3.1
|
|
||||||
|
|
||||||
The ``debug()`` method was implemented to allow running a test without
|
|
||||||
collecting the result and catching exceptions.
|
|
||||||
|
|
||||||
``TransactionTestCase``
|
``TransactionTestCase``
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
@ -1806,8 +1801,6 @@ won't be run.
|
||||||
Testing asynchronous code
|
Testing asynchronous code
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
.. versionadded:: 3.1
|
|
||||||
|
|
||||||
If you merely want to test the output of your asynchronous views, the standard
|
If you merely want to test the output of your asynchronous views, the standard
|
||||||
test client will run them inside their own asynchronous loop without any extra
|
test client will run them inside their own asynchronous loop without any extra
|
||||||
work needed on your part.
|
work needed on your part.
|
||||||
|
|
Loading…
Reference in New Issue