Removed versionadded/changed annotations for 3.0.

This commit is contained in:
Mariusz Felisiak 2020-05-04 12:29:31 +02:00
parent 3b94f12462
commit 4c5236ef93
39 changed files with 2 additions and 299 deletions

View File

@ -99,8 +99,6 @@ and underscores from the original filename, removing everything else.
.. method:: get_alternative_name(file_root, file_ext) .. method:: get_alternative_name(file_root, file_ext)
.. versionadded:: 3.0
Returns an alternative filename based on the ``file_root`` and ``file_ext`` Returns an alternative filename based on the ``file_root`` and ``file_ext``
parameters. By default, an underscore plus a random 7 character alphanumeric parameters. By default, an underscore plus a random 7 character alphanumeric
string is appended to the filename before the extension. string is appended to the filename before the extension.

View File

@ -72,11 +72,6 @@ this header instead, set the :setting:`X_FRAME_OPTIONS` setting::
X_FRAME_OPTIONS = 'SAMEORIGIN' X_FRAME_OPTIONS = 'SAMEORIGIN'
.. versionchanged:: 3.0
The default value of the :setting:`X_FRAME_OPTIONS` setting was changed
from ``SAMEORIGIN`` to ``DENY``.
When using the middleware there may be some views where you do **not** want the When using the middleware there may be some views where you do **not** want the
``X-Frame-Options`` header set. For those cases, you can use a view decorator ``X-Frame-Options`` header set. For those cases, you can use a view decorator
that tells the middleware not to set the header:: that tells the middleware not to set the header::

View File

@ -1649,8 +1649,6 @@ templates used by the :class:`ModelAdmin` views:
.. method:: ModelAdmin.get_inlines(request, obj) .. method:: ModelAdmin.get_inlines(request, obj)
.. versionadded:: 3.0
The ``get_inlines`` method is given the ``HttpRequest`` and the The ``get_inlines`` method is given the ``HttpRequest`` and the
``obj`` being edited (or ``None`` on an add form) and is expected to return ``obj`` being edited (or ``None`` on an add form) and is expected to return
an iterable of inlines. You can override this method to dynamically add an iterable of inlines. You can override this method to dynamically add
@ -2151,10 +2149,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.0
jQuery was upgraded from 3.3.1 to 3.4.1.
.. versionchanged:: 3.1 .. versionchanged:: 3.1
jQuery was upgraded from 3.4.1 to 3.5.1. jQuery was upgraded from 3.4.1 to 3.5.1.

View File

@ -194,8 +194,6 @@ Methods
.. method:: get_user_permissions(obj=None) .. method:: get_user_permissions(obj=None)
.. versionadded:: 3.0
Returns a set of permission strings that the user has directly. Returns a set of permission strings that the user has directly.
If ``obj`` is passed in, only returns the user permissions for this If ``obj`` is passed in, only returns the user permissions for this
@ -288,14 +286,8 @@ Manager methods
Same as :meth:`create_user`, but sets :attr:`~models.User.is_staff` and Same as :meth:`create_user`, but sets :attr:`~models.User.is_staff` and
:attr:`~models.User.is_superuser` to ``True``. :attr:`~models.User.is_superuser` to ``True``.
.. versionchanged:: 3.0
The ``email`` and ``password`` parameters were made optional.
.. method:: with_perm(perm, is_active=True, include_superusers=True, backend=None, obj=None) .. method:: with_perm(perm, is_active=True, include_superusers=True, backend=None, obj=None)
.. versionadded:: 3.0
Returns users that have the given permission ``perm`` either in the Returns users that have the given permission ``perm`` either in the
``"<app label>.<permission codename>"`` format or as a ``"<app label>.<permission codename>"`` format or as a
:class:`~django.contrib.auth.models.Permission` instance. Returns an :class:`~django.contrib.auth.models.Permission` instance. Returns an
@ -499,8 +491,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
.. class:: BaseBackend .. class:: BaseBackend
.. versionadded:: 3.0
A base class that provides default implementations for all required A base class that provides default implementations for all required
methods. By default, it will reject any user and provide no permissions. methods. By default, it will reject any user and provide no permissions.
@ -603,8 +593,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
.. method:: with_perm(perm, is_active=True, include_superusers=True, obj=None) .. method:: with_perm(perm, is_active=True, include_superusers=True, obj=None)
.. versionadded:: 3.0
Returns all active users who have the permission ``perm`` either in Returns all active users who have the permission ``perm`` either in
the form of ``"<app label>.<permission codename>"`` or a the form of ``"<app label>.<permission codename>"`` or a
:class:`~django.contrib.auth.models.Permission` instance. Returns an :class:`~django.contrib.auth.models.Permission` instance. Returns an

View File

@ -28,10 +28,6 @@ not conform to the OGC standard. Django supports spatial functions operating on
real geometries available in modern MySQL versions. However, the spatial real geometries available in modern MySQL versions. However, the spatial
functions are not as rich as other backends like PostGIS. functions are not as rich as other backends like PostGIS.
.. versionchanged:: 3.0
Support for spatial functions operating on real geometries was added.
.. warning:: .. warning::
True spatial indexes (R-trees) are only supported with True spatial indexes (R-trees) are only supported with

View File

@ -361,8 +361,6 @@ __ https://en.wikipedia.org/wiki/Geohash
.. class:: GeometryDistance(expr1, expr2, **extra) .. class:: GeometryDistance(expr1, expr2, **extra)
.. versionadded:: 3.0
*Availability*: `PostGIS <https://postgis.net/docs/geometry_distance_knn.html>`__ *Availability*: `PostGIS <https://postgis.net/docs/geometry_distance_knn.html>`__
Accepts two geographic fields or expressions and returns the distance between Accepts two geographic fields or expressions and returns the distance between

View File

@ -86,10 +86,6 @@ Keyword Arguments Description
the :setting:`GEOIP_CITY` setting. the :setting:`GEOIP_CITY` setting.
=================== ======================================================= =================== =======================================================
.. versionchanged:: 3.0
Support for :class:`pathlib.Path` ``path`` was added.
Methods Methods
======= =======
@ -159,10 +155,6 @@ A string or :class:`pathlib.Path` specifying the directory where the GeoIP data
files are located. This setting is *required* unless manually specified files are located. This setting is *required* unless manually specified
with ``path`` keyword when initializing the :class:`GeoIP2` object. with ``path`` keyword when initializing the :class:`GeoIP2` object.
.. versionchanged:: 3.0
Support for :class:`pathlib.Path` was added.
.. setting:: GEOIP_COUNTRY .. setting:: GEOIP_COUNTRY
``GEOIP_COUNTRY`` ``GEOIP_COUNTRY``

View File

@ -156,11 +156,6 @@ MySQL ``ST_Contains(poly, geom)``
SpatiaLite ``Contains(poly, geom)`` SpatiaLite ``Contains(poly, geom)``
========== ============================ ========== ============================
.. versionchanged:: 3.0
In older versions, MySQL uses ``MBRContains`` and operates only on bounding
boxes.
.. fieldlookup:: contains_properly .. fieldlookup:: contains_properly
``contains_properly`` ``contains_properly``
@ -251,10 +246,6 @@ MySQL ``ST_Crosses(poly, geom)``
SpatiaLite ``Crosses(poly, geom)`` SpatiaLite ``Crosses(poly, geom)``
========== ========================== ========== ==========================
.. versionchanged:: 3.0
MySQL support was added.
.. fieldlookup:: disjoint .. fieldlookup:: disjoint
``disjoint`` ``disjoint``
@ -279,11 +270,6 @@ MySQL ``ST_Disjoint(poly, geom)``
SpatiaLite ``Disjoint(poly, geom)`` SpatiaLite ``Disjoint(poly, geom)``
========== ================================================= ========== =================================================
.. versionchanged:: 3.0
In older versions, MySQL uses ``MBRDisjoint`` and operates only on bounding
boxes.
.. fieldlookup:: equals .. fieldlookup:: equals
``equals`` ``equals``
@ -308,11 +294,6 @@ MySQL ``ST_Equals(poly, geom)``
SpatiaLite ``Equals(poly, geom)`` SpatiaLite ``Equals(poly, geom)``
========== ================================================= ========== =================================================
.. versionchanged:: 3.0
In older versions, MySQL uses ``MBREquals`` and operates only on bounding
boxes.
.. fieldlookup:: exact .. fieldlookup:: exact
:noindex: :noindex:
.. fieldlookup:: same_as .. fieldlookup:: same_as
@ -341,11 +322,6 @@ MySQL ``ST_Equals(poly, geom)``
SpatiaLite ``Equals(poly, geom)`` SpatiaLite ``Equals(poly, geom)``
========== ================================================= ========== =================================================
.. versionchanged:: 3.0
In older versions, MySQL uses ``MBREquals`` and operates only on bounding
boxes.
.. fieldlookup:: intersects .. fieldlookup:: intersects
``intersects`` ``intersects``
@ -370,11 +346,6 @@ MySQL ``ST_Intersects(poly, geom)``
SpatiaLite ``Intersects(poly, geom)`` SpatiaLite ``Intersects(poly, geom)``
========== ================================================= ========== =================================================
.. versionchanged:: 3.0
In older versions, MySQL uses ``MBRIntersects`` and operates only on
bounding boxes.
.. fieldlookup:: isvalid .. fieldlookup:: isvalid
``isvalid`` ``isvalid``
@ -416,11 +387,6 @@ MySQL ``ST_Overlaps(poly, geom)``
SpatiaLite ``Overlaps(poly, geom)`` SpatiaLite ``Overlaps(poly, geom)``
========== ============================ ========== ============================
.. versionchanged:: 3.0
In older versions, MySQL uses ``MBROverlaps`` and operates only on bounding
boxes.
.. fieldlookup:: relate .. fieldlookup:: relate
``relate`` ``relate``
@ -521,11 +487,6 @@ Oracle ``SDO_TOUCH(poly, geom)``
SpatiaLite ``Touches(poly, geom)`` SpatiaLite ``Touches(poly, geom)``
========== ========================== ========== ==========================
.. versionchanged:: 3.0
In older versions, MySQL uses ``MBRTouches`` and operates only on bounding
boxes.
.. fieldlookup:: within .. fieldlookup:: within
``within`` ``within``
@ -550,11 +511,6 @@ Oracle ``SDO_INSIDE(poly, geom)``
SpatiaLite ``Within(poly, geom)`` SpatiaLite ``Within(poly, geom)``
========== ========================== ========== ==========================
.. versionchanged:: 3.0
In older versions, MySQL uses ``MBRWithin`` and operates only on bounding
boxes.
.. fieldlookup:: left .. fieldlookup:: left
``left`` ``left``

View File

@ -78,11 +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.0
All numeric values are now translated as plural, except ``1.0`` which is
translated as a singular phrase. This may be incorrect for some languages.
.. versionchanged:: 3.1 .. versionchanged:: 3.1
Support for negative integers was added. Support for negative integers was added.

View File

@ -12,8 +12,6 @@ PostgreSQL supports additional data integrity constraints available from the
``ExclusionConstraint`` ``ExclusionConstraint``
======================= =======================
.. versionadded:: 3.0
.. class:: ExclusionConstraint(*, name, expressions, index_type=None, condition=None, deferrable=None) .. class:: ExclusionConstraint(*, name, expressions, index_type=None, condition=None, deferrable=None)
Creates an exclusion constraint in the database. Internally, PostgreSQL Creates an exclusion constraint in the database. Internally, PostgreSQL

View File

@ -889,8 +889,6 @@ types.
Range operators Range operators
--------------- ---------------
.. versionadded:: 3.0
.. class:: RangeOperators .. class:: RangeOperators
PostgreSQL provides a set of SQL operators that can be used together with the PostgreSQL provides a set of SQL operators that can be used together with the
@ -917,8 +915,6 @@ corresponding lookups.
RangeBoundary() expressions RangeBoundary() expressions
--------------------------- ---------------------------
.. versionadded:: 3.0
.. class:: RangeBoundary(inclusive_lower=True, inclusive_upper=False) .. class:: RangeBoundary(inclusive_lower=True, inclusive_upper=False)
.. attribute:: inclusive_lower .. attribute:: inclusive_lower

View File

@ -111,8 +111,6 @@ run the query ``CREATE EXTENSION IF NOT EXISTS hstore;``.
Index concurrent operations Index concurrent operations
=========================== ===========================
.. versionadded:: 3.0
PostgreSQL supports the ``CONCURRENTLY`` option to ``CREATE INDEX`` and PostgreSQL supports the ``CONCURRENTLY`` option to ``CREATE INDEX`` and
``DROP INDEX`` statements to add and remove indexes without locking out writes. ``DROP INDEX`` statements to add and remove indexes without locking out writes.
This option is useful for adding or removing an index in a live production This option is useful for adding or removing an index in a live production

View File

@ -310,11 +310,6 @@ appropriate ``<language>`` tag (RSS 2.0) or ``xml:lang`` attribute (Atom). By
default, this is :func:`django.utils.translation.get_language()`. You can change it default, this is :func:`django.utils.translation.get_language()`. You can change it
by setting the ``language`` class attribute. by setting the ``language`` class attribute.
.. versionchanged:: 3.0
The ``language`` class attribute was added. In older versions, the behavior
is the same as ``language = settings.LANGUAGE_CODE``.
URLs URLs
---- ----

View File

@ -287,8 +287,6 @@ non-durable <https://www.postgresql.org/docs/current/non-durability.html>`_.
MariaDB notes MariaDB notes
============= =============
.. versionadded:: 3.0
Django supports MariaDB 10.2 and higher. Django supports MariaDB 10.2 and higher.
To use MariaDB, use the MySQL backend, which is shared between the two. See the To use MariaDB, use the MySQL backend, which is shared between the two. See the

View File

@ -175,8 +175,6 @@ Example usage::
.. django-admin-option:: --ignore PATTERN, -i PATTERN .. django-admin-option:: --ignore PATTERN, -i PATTERN
.. versionadded:: 3.0
Ignores directories matching the given :mod:`glob`-style pattern. Use Ignores directories matching the given :mod:`glob`-style pattern. Use
multiple times to ignore more. multiple times to ignore more.
@ -1131,10 +1129,6 @@ under them.
This is the default output format. This is the default output format.
.. versionchanged:: 3.0
Output of the applied datetimes at verbosity 2 and above was added.
.. django-admin-option:: --plan, -p .. django-admin-option:: --plan, -p
Shows the migration plan Django will follow to apply migrations. Like Shows the migration plan Django will follow to apply migrations. Like
@ -1276,11 +1270,6 @@ zip files, you can use a URL like::
django-admin startapp --template=https://github.com/githubuser/django-app-template/archive/master.zip myapp django-admin startapp --template=https://github.com/githubuser/django-app-template/archive/master.zip myapp
.. versionchanged:: 3.0
Support for XZ archives (``.tar.xz``, ``.txz``) and LZMA archives
(``.tar.lzma``, ``.tlz``) was added.
.. django-admin-option:: --extension EXTENSIONS, -e EXTENSIONS .. django-admin-option:: --extension EXTENSIONS, -e EXTENSIONS
Specifies which file extensions in the app template should be rendered with the Specifies which file extensions in the app template should be rendered with the
@ -1490,8 +1479,6 @@ May be specified multiple times and combined with :option:`test --tag`.
.. django-admin-option:: -k TEST_NAME_PATTERNS .. django-admin-option:: -k TEST_NAME_PATTERNS
.. versionadded:: 3.0
Runs test methods and classes matching test name patterns, in the same way as Runs test methods and classes matching test name patterns, in the same way as
:option:`unittest's -k option<unittest.-k>`. Can be specified multiple times. :option:`unittest's -k option<unittest.-k>`. Can be specified multiple times.
@ -1501,8 +1488,6 @@ Runs test methods and classes matching test name patterns, in the same way as
.. django-admin-option:: --pdb .. django-admin-option:: --pdb
.. versionadded:: 3.0
Spawns a ``pdb`` debugger at each test error or failure. If you have it Spawns a ``pdb`` debugger at each test error or failure. If you have it
installed, ``ipdb`` is used instead. installed, ``ipdb`` is used instead.
@ -1635,11 +1620,6 @@ fields (listed in
are overridden by a command line argument. For example, to provide an ``email`` are overridden by a command line argument. For example, to provide an ``email``
field, you can use ``DJANGO_SUPERUSER_EMAIL`` environment variable. field, you can use ``DJANGO_SUPERUSER_EMAIL`` environment variable.
.. versionchanged:: 3.0
Support for using ``DJANGO_SUPERUSER_PASSWORD`` and
``DJANGO_SUPERUSER_<uppercase_field_name>`` environment variables was added.
.. django-admin-option:: --noinput, --no-input .. django-admin-option:: --noinput, --no-input
Suppresses all user prompts. If a suppressed prompt cannot be resolved Suppresses all user prompts. If a suppressed prompt cannot be resolved
@ -1825,8 +1805,6 @@ colored output to another command.
.. django-admin-option:: --skip-checks .. django-admin-option:: --skip-checks
.. versionadded:: 3.0
Skips running system checks prior to running the command. This option is only Skips running system checks prior to running the command. This option is only
available if the available if the
:attr:`~django.core.management.BaseCommand.requires_system_checks` command :attr:`~django.core.management.BaseCommand.requires_system_checks` command

View File

@ -167,8 +167,6 @@ list of errors.
.. exception:: RequestAborted .. exception:: RequestAborted
.. versionadded:: 3.0
The :exc:`RequestAborted` exception is raised when a HTTP body being read The :exc:`RequestAborted` exception is raised when a HTTP body being read
in by the handler is cut off midstream and the client connection closes, in by the handler is cut off midstream and the client connection closes,
or when the client does not send data and hits a timeout where the server or when the client does not send data and hits a timeout where the server
@ -184,8 +182,6 @@ list of errors.
.. exception:: SynchronousOnlyOperation .. exception:: SynchronousOnlyOperation
.. versionadded:: 3.0
The :exc:`SynchronousOnlyOperation` exception is raised when code that The :exc:`SynchronousOnlyOperation` exception is raised when code that
is only allowed in synchronous Python code is called from an asynchronous is only allowed in synchronous Python code is called from an asynchronous
context (a thread with a running asynchronous event loop). These parts of context (a thread with a running asynchronous event loop). These parts of

View File

@ -112,8 +112,6 @@ The ``Storage`` class
.. method:: get_alternative_name(file_root, file_ext) .. method:: get_alternative_name(file_root, file_ext)
.. versionadded:: 3.0
Returns an alternative filename based on the ``file_root`` and Returns an alternative filename based on the ``file_root`` and
``file_ext`` parameters, an underscore plus a random 7 character ``file_ext`` parameters, an underscore plus a random 7 character
alphanumeric string is appended to the filename before the extension. alphanumeric string is appended to the filename before the extension.

View File

@ -247,8 +247,6 @@ __ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Se
Referrer Policy Referrer Policy
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
.. versionadded:: 3.0
Browsers use `the Referer header`__ as a way to send information to a site Browsers use `the Referer header`__ as a way to send information to a site
about how users got there. When a user clicks a link, the browser will send the about how users got there. When a user clicks a link, the browser will send the
full URL of the linking page as the referrer. While this can be useful for some full URL of the linking page as the referrer. While this can be useful for some

View File

@ -48,10 +48,6 @@ objects that have an ``output_field`` that is a
:class:`~django.db.models.BooleanField`. The result is provided using the :class:`~django.db.models.BooleanField`. The result is provided using the
``then`` keyword. ``then`` keyword.
.. versionchanged:: 3.0
Support for boolean :class:`~django.db.models.Expression` was added.
Some examples:: Some examples::
>>> from django.db.models import F, Q, When >>> from django.db.models import F, Q, When
@ -252,8 +248,6 @@ The two SQL statements are functionally equivalent but the more explicit
Conditional filter Conditional filter
------------------ ------------------
.. versionadded:: 3.0
When a conditional expression returns a boolean value, it is possible to use it When a conditional expression returns a boolean value, it is possible to use it
directly in filters. This means that it will not be added to the ``SELECT`` directly in filters. This means that it will not be added to the ``SELECT``
columns, but you can still use it to filter results:: columns, but you can still use it to filter results::

View File

@ -69,10 +69,6 @@ ensures the age field is never less than 18.
The name of the constraint. The name of the constraint.
.. versionchanged:: 3.0
Interpolation of ``'%(app_label)s'`` and ``'%(class)s'`` was added.
``UniqueConstraint`` ``UniqueConstraint``
==================== ====================
@ -99,10 +95,6 @@ date.
The name of the constraint. The name of the constraint.
.. versionchanged:: 3.0
Interpolation of ``'%(app_label)s'`` and ``'%(class)s'`` was added.
``condition`` ``condition``
------------- -------------

View File

@ -479,10 +479,6 @@ The ``is_dst`` parameter indicates whether or not ``pytz`` should interpret
nonexistent and ambiguous datetimes in daylight saving time. By default (when nonexistent and ambiguous datetimes in daylight saving time. By default (when
``is_dst=None``), ``pytz`` raises an exception for such datetimes. ``is_dst=None``), ``pytz`` raises an exception for such datetimes.
.. versionadded:: 3.0
The ``is_dst`` parameter was added.
Given the datetime ``2015-06-15 14:30:50.000321+00:00``, the built-in ``kind``\s Given the datetime ``2015-06-15 14:30:50.000321+00:00``, the built-in ``kind``\s
return: return:
@ -1120,8 +1116,6 @@ It can also be registered as a transform. For example::
.. class:: Sign(expression, **extra) .. class:: Sign(expression, **extra)
.. versionadded:: 3.0
Returns the sign (-1, 0, 1) of a numeric field or expression. Returns the sign (-1, 0, 1) of a numeric field or expression.
Usage example:: Usage example::
@ -1357,8 +1351,6 @@ spaces.
.. class:: MD5(expression, **extra) .. class:: MD5(expression, **extra)
.. versionadded:: 3.0
Accepts a single text field or expression and returns the MD5 hash of the Accepts a single text field or expression and returns the MD5 hash of the
string. string.
@ -1489,8 +1481,6 @@ spaces.
.. class:: SHA384(expression, **extra) .. class:: SHA384(expression, **extra)
.. class:: SHA512(expression, **extra) .. class:: SHA512(expression, **extra)
.. versionadded:: 3.0
Accepts a single text field or expression and returns the particular hash of Accepts a single text field or expression and returns the particular hash of
the string. the string.

View File

@ -641,13 +641,6 @@ directly filter a queryset::
This will ensure that the subquery will not be added to the ``SELECT`` columns, This will ensure that the subquery will not be added to the ``SELECT`` columns,
which may result in a better performance. which may result in a better performance.
.. versionchanged:: 3.0
In previous versions of Django, it was necessary to first annotate and then
filter against the annotation. This resulted in the annotated value always
being present in the query result, and often resulted in a query that took
more time to execute.
Using aggregates within a ``Subquery`` expression Using aggregates within a ``Subquery`` expression
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -995,10 +988,6 @@ calling the appropriate methods on the wrapped expression.
to a column. The ``alias`` parameter will be ``None`` unless the to a column. The ``alias`` parameter will be ``None`` unless the
expression has been annotated and is used for grouping. expression has been annotated and is used for grouping.
.. versionchanged:: 3.0
The ``alias`` parameter was added.
.. method:: asc(nulls_first=False, nulls_last=False) .. method:: asc(nulls_first=False, nulls_last=False)
Returns the expression ready to be sorted in ascending order. Returns the expression ready to be sorted in ascending order.

View File

@ -301,10 +301,6 @@ There are some additional caveats to be aware of:
__empty__ = _('(Unknown)') __empty__ = _('(Unknown)')
.. versionadded:: 3.0
The ``TextChoices``, ``IntegerChoices``, and ``Choices`` classes were added.
``db_column`` ``db_column``
------------- -------------
@ -816,10 +812,6 @@ Has two optional arguments:
class MyModel(models.Model): class MyModel(models.Model):
upload = models.FileField(upload_to=user_directory_path) upload = models.FileField(upload_to=user_directory_path)
.. versionchanged:: 3.0
Support for :class:`pathlib.Path` was added.
.. attribute:: FileField.storage .. attribute:: FileField.storage
A storage object, or a callable which returns a storage object. This A storage object, or a callable which returns a storage object. This
@ -1030,10 +1022,6 @@ directory on the filesystem. Has some special arguments, of which the first is
class MyModel(models.Model): class MyModel(models.Model):
file = models.FilePathField(path=images_path) file = models.FilePathField(path=images_path)
.. versionchanged:: 3.0
``path`` can now be a callable.
.. attribute:: FilePathField.match .. attribute:: FilePathField.match
Optional. A regular expression, as a string, that :class:`FilePathField` Optional. A regular expression, as a string, that :class:`FilePathField`
@ -1315,8 +1303,6 @@ It uses :class:`~django.core.validators.validate_slug` or
.. class:: SmallAutoField(**options) .. class:: SmallAutoField(**options)
.. versionadded:: 3.0
Like an :class:`AutoField`, but only allows values under a certain Like an :class:`AutoField`, but only allows values under a certain
(database-dependent) limit. Values from ``1`` to ``32767`` are safe in all (database-dependent) limit. Values from ``1`` to ``32767`` are safe in all
databases supported by Django. databases supported by Django.
@ -1820,11 +1806,6 @@ that control how the relationship functions.
add the descriptor for the reverse relationship, allowing add the descriptor for the reverse relationship, allowing
:class:`ManyToManyField` relationships to be non-symmetrical. :class:`ManyToManyField` relationships to be non-symmetrical.
.. versionchanged:: 3.0
Specifying ``symmetrical=True`` for recursive many-to-many
relationships using an intermediary model was allowed.
.. attribute:: ManyToManyField.through .. attribute:: ManyToManyField.through
Django will automatically generate a table to manage many-to-many Django will automatically generate a table to manage many-to-many
@ -2078,8 +2059,6 @@ Field API reference
.. attribute:: descriptor_class .. attribute:: descriptor_class
.. versionadded:: 3.0
A class implementing the :py:ref:`descriptor protocol <descriptors>` A class implementing the :py:ref:`descriptor protocol <descriptors>`
that is instantiated and assigned to the model instance attribute. The that is instantiated and assigned to the model instance attribute. The
constructor must accept a single argument, the ``Field`` instance. constructor must accept a single argument, the ``Field`` instance.

View File

@ -61,10 +61,6 @@ than 30 characters and shouldn't start with a number (0-9) or underscore (_).
concrete model. For example ``Index(fields=['title'], concrete model. For example ``Index(fields=['title'],
name='%(app_label)s_%(class)s_title_index')``. name='%(app_label)s_%(class)s_title_index')``.
.. versionchanged:: 3.0
Interpolation of ``'%(app_label)s'`` and ``'%(class)s'`` was added.
``db_tablespace`` ``db_tablespace``
----------------- -----------------

View File

@ -496,12 +496,6 @@ which returns ``NULL``. In such cases it is possible to revert to the old
algorithm by setting the :attr:`~django.db.models.Options.select_on_save` algorithm by setting the :attr:`~django.db.models.Options.select_on_save`
option to ``True``. option to ``True``.
.. versionchanged:: 3.0
``Model.save()`` no longer attempts to find a row when saving a new
``Model`` instance and a default value for the primary key is provided, and
always executes an ``INSERT``.
.. _ref-models-force-insert: .. _ref-models-force-insert:
Forcing an INSERT or UPDATE Forcing an INSERT or UPDATE

View File

@ -3455,10 +3455,6 @@ by the aggregate.
This is the SQL equivalent of ``AVG(DISTINCT <field>)``. The default This is the SQL equivalent of ``AVG(DISTINCT <field>)``. The default
value is ``False``. value is ``False``.
.. versionchanged:: 3.0
Support for ``distinct=True`` was added.
``Count`` ``Count``
~~~~~~~~~ ~~~~~~~~~
@ -3534,10 +3530,6 @@ by the aggregate.
the SQL equivalent of ``SUM(DISTINCT <field>)``. The default value is the SQL equivalent of ``SUM(DISTINCT <field>)``. The default value is
``False``. ``False``.
.. versionchanged:: 3.0
Support for ``distinct=True`` was added.
``Variance`` ``Variance``
~~~~~~~~~~~~ ~~~~~~~~~~~~

View File

@ -202,10 +202,6 @@ All attributes should be considered read-only, unless stated otherwise.
{{ request.headers.user_agent }} {{ request.headers.user_agent }}
.. versionchanged:: 3.0
Support for lookups using underscores was added.
.. attribute:: HttpRequest.resolver_match .. attribute:: HttpRequest.resolver_match
An instance of :class:`~django.urls.ResolverMatch` representing the An instance of :class:`~django.urls.ResolverMatch` representing the
@ -684,10 +680,6 @@ or :class:`memoryview`, to the :class:`HttpResponse` constructor::
>>> response = HttpResponse(b'Bytestrings are also accepted.') >>> response = HttpResponse(b'Bytestrings are also accepted.')
>>> response = HttpResponse(memoryview(b'Memoryview as well.')) >>> response = HttpResponse(memoryview(b'Memoryview as well.'))
.. versionchanged:: 3.0
Support for :class:`memoryview` was added.
But if you want to add content incrementally, you can use ``response`` as a But if you want to add content incrementally, you can use ``response`` as a
file-like object:: file-like object::
@ -812,10 +804,6 @@ Methods
given it will be extracted from ``content_type``, and if that given it will be extracted from ``content_type``, and if that
is unsuccessful, the :setting:`DEFAULT_CHARSET` setting will be used. is unsuccessful, the :setting:`DEFAULT_CHARSET` setting will be used.
.. versionchanged:: 3.0
Support for :class:`memoryview` ``content`` was added.
.. method:: HttpResponse.__setitem__(header, value) .. method:: HttpResponse.__setitem__(header, value)
Sets the given header name to the given value. Both ``header`` and Sets the given header name to the given value. Both ``header`` and

View File

@ -1561,10 +1561,6 @@ when using the :djadmin:`collectstatic` management command. See
way that modes must be specified. If you try to use ``644``, you'll way that modes must be specified. If you try to use ``644``, you'll
get totally incorrect behavior. get totally incorrect behavior.
.. versionchanged:: 3.0
In older versions, the default value is ``None``.
.. setting:: FILE_UPLOAD_TEMP_DIR .. setting:: FILE_UPLOAD_TEMP_DIR
``FILE_UPLOAD_TEMP_DIR`` ``FILE_UPLOAD_TEMP_DIR``
@ -1823,8 +1819,6 @@ deletes the old one.
``LANGUAGE_COOKIE_HTTPONLY`` ``LANGUAGE_COOKIE_HTTPONLY``
---------------------------- ----------------------------
.. versionadded:: 3.0
Default: ``False`` Default: ``False``
Whether to use ``HttpOnly`` flag on the language cookie. If this is set to Whether to use ``HttpOnly`` flag on the language cookie. If this is set to
@ -1872,8 +1866,6 @@ deletes the one.
``LANGUAGE_COOKIE_SAMESITE`` ``LANGUAGE_COOKIE_SAMESITE``
---------------------------- ----------------------------
.. versionadded:: 3.0
Default: ``None`` Default: ``None``
The value of the `SameSite`_ flag on the language cookie. This flag prevents the The value of the `SameSite`_ flag on the language cookie. This flag prevents the
@ -1890,8 +1882,6 @@ See :setting:`SESSION_COOKIE_SAMESITE` for details about ``SameSite``.
``LANGUAGE_COOKIE_SECURE`` ``LANGUAGE_COOKIE_SECURE``
-------------------------- --------------------------
.. versionadded:: 3.0
Default: ``False`` Default: ``False``
Whether to use a secure cookie for the language cookie. If this is set to Whether to use a secure cookie for the language cookie. If this is set to
@ -2263,10 +2253,6 @@ If ``True``, the :class:`~django.middleware.security.SecurityMiddleware`
sets the :ref:`x-content-type-options` header on all responses that do not sets the :ref:`x-content-type-options` header on all responses that do not
already have it. already have it.
.. versionchanged:: 3.0
In older versions, the default value is ``False``.
.. setting:: SECURE_HSTS_INCLUDE_SUBDOMAINS .. setting:: SECURE_HSTS_INCLUDE_SUBDOMAINS
``SECURE_HSTS_INCLUDE_SUBDOMAINS`` ``SECURE_HSTS_INCLUDE_SUBDOMAINS``
@ -2393,8 +2379,6 @@ from URL paths, so patterns shouldn't include them, e.g.
``SECURE_REFERRER_POLICY`` ``SECURE_REFERRER_POLICY``
-------------------------- --------------------------
.. versionadded:: 3.0
Default: ``'same-origin'`` Default: ``'same-origin'``
If configured, the :class:`~django.middleware.security.SecurityMiddleware` sets If configured, the :class:`~django.middleware.security.SecurityMiddleware` sets
@ -2887,10 +2871,6 @@ The default value for the X-Frame-Options header used by
:class:`~django.middleware.clickjacking.XFrameOptionsMiddleware`. See the :class:`~django.middleware.clickjacking.XFrameOptionsMiddleware`. See the
:doc:`clickjacking protection </ref/clickjacking/>` documentation. :doc:`clickjacking protection </ref/clickjacking/>` documentation.
.. versionchanged:: 3.0
In older versions, the default value is ``SAMEORIGIN``.
Auth Auth
==== ====

View File

@ -71,21 +71,13 @@ need to distinguish caches by the ``Accept-language`` header.
private`` header to a response to indicate that a page should never be private`` header to a response to indicate that a page should never be
cached. cached.
.. versionchanged:: 3.0
``private`` directive was added.
.. function:: patch_vary_headers(response, newheaders) .. function:: patch_vary_headers(response, newheaders)
Adds (or updates) the ``Vary`` header in the given ``HttpResponse`` object. Adds (or updates) the ``Vary`` header in the given ``HttpResponse`` object.
``newheaders`` is a list of header names that should be in ``Vary``. If ``newheaders`` is a list of header names that should be in ``Vary``. If
headers contains an asterisk, then ``Vary`` header will consist of a single headers contains an asterisk, then ``Vary`` header will consist of a single
asterisk ``'*'``. Otherwise, existing headers in ``Vary`` aren't removed. asterisk ``'*'``, according to :rfc:`7231#section-7.1.4`. Otherwise,
existing headers in ``Vary`` aren't removed.
.. versionchanged:: 3.0
Handling an asterisk ``'*'`` according to :rfc:`7231#section-7.1.4` was
added.
.. function:: get_cache_key(request, key_prefix=None, method='GET', cache=None) .. function:: get_cache_key(request, key_prefix=None, method='GET', cache=None)
@ -643,11 +635,6 @@ escaping HTML.
for use in HTML. The input is first coerced to a string and the output has for use in HTML. The input is first coerced to a string and the output has
:func:`~django.utils.safestring.mark_safe` applied. :func:`~django.utils.safestring.mark_safe` applied.
.. versionchanged:: 3.0
In older versions, ``'`` is converted to its decimal code ``&#39;``
instead of the equivalent hex code ``&#x27;``.
.. function:: conditional_escape(text) .. function:: conditional_escape(text)
Similar to ``escape()``, except that it doesn't operate on pre-escaped Similar to ``escape()``, except that it doesn't operate on pre-escaped

View File

@ -2,8 +2,6 @@
Asynchronous support Asynchronous support
==================== ====================
.. versionadded:: 3.0
.. currentmodule:: asgiref.sync .. currentmodule:: asgiref.sync
Django has support for writing asynchronous ("async") views, along with an Django has support for writing asynchronous ("async") views, along with an

View File

@ -577,14 +577,6 @@ password resets. You must then provide some key implementation details:
``REQUIRED_FIELDS`` has no effect in other parts of Django, like ``REQUIRED_FIELDS`` has no effect in other parts of Django, like
creating a user in the admin. creating a user in the admin.
.. versionadded:: 3.0
:attr:`REQUIRED_FIELDS` now supports
:class:`~django.db.models.ManyToManyField`\s without a custom
through model. Since there is no way to pass model instances during
the :djadmin:`createsuperuser` prompt, expect the user to enter IDs
of existing instances of the class to which the model is related.
For example, here is the partial definition for a user model that For example, here is the partial definition for a user model that
defines two required fields - a date of birth and height:: defines two required fields - a date of birth and height::
@ -934,8 +926,6 @@ methods and attributes:
.. method:: models.PermissionsMixin.get_user_permissions(obj=None) .. method:: models.PermissionsMixin.get_user_permissions(obj=None)
.. versionadded:: 3.0
Returns a set of permission strings that the user has directly. Returns a set of permission strings that the user has directly.
If ``obj`` is passed in, only returns the user permissions for this If ``obj`` is passed in, only returns the user permissions for this

View File

@ -1398,10 +1398,6 @@ implementation details see :ref:`using-the-views`.
* ``reset_url_token``: Token parameter displayed as a component of password * ``reset_url_token``: Token parameter displayed as a component of password
reset URLs. Defaults to ``'set-password'``. reset URLs. Defaults to ``'set-password'``.
.. versionchanged:: 3.0
The ``reset_url_token`` class attribute was added.
**Template context:** **Template context:**
* ``form``: The form (see ``form_class`` above) for setting the new user's * ``form``: The form (see ``form_class`` above) for setting the new user's

View File

@ -459,8 +459,6 @@ control the widget used with
``ordering_widget`` ``ordering_widget``
^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
.. versionadded:: 3.0
.. attribute:: BaseFormSet.ordering_widget .. attribute:: BaseFormSet.ordering_widget
Default: :class:`~django.forms.NumberInput` Default: :class:`~django.forms.NumberInput`
@ -478,8 +476,6 @@ Set ``ordering_widget`` to specify the widget class to be used with
``get_ordering_widget`` ``get_ordering_widget``
^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
.. versionadded:: 3.0
.. method:: BaseFormSet.get_ordering_widget() .. method:: BaseFormSet.get_ordering_widget()
Override ``get_ordering_widget()`` if you need to provide a widget instance for Override ``get_ordering_widget()`` if you need to provide a widget instance for

View File

@ -121,7 +121,3 @@ client-side caching.
This decorator adds a ``Cache-Control: max-age=0, no-cache, no-store, This decorator adds a ``Cache-Control: max-age=0, no-cache, no-store,
must-revalidate, private`` header to a response to indicate that a page must-revalidate, private`` header to a response to indicate that a page
should never be cached. should never be cached.
.. versionchanged:: 3.0
``private`` directive was added.

View File

@ -246,8 +246,6 @@ You can edit it multiple times.
.. method:: get_session_cookie_age() .. method:: get_session_cookie_age()
.. versionadded:: 3.0
Returns the age of session cookies, in seconds. Defaults to Returns the age of session cookies, in seconds. Defaults to
:setting:`SESSION_COOKIE_AGE`. :setting:`SESSION_COOKIE_AGE`.

View File

@ -61,11 +61,6 @@ algorithm the system follows to determine which Python code to execute:
in the optional ``kwargs`` argument to :func:`django.urls.path` or in the optional ``kwargs`` argument to :func:`django.urls.path` or
:func:`django.urls.re_path`. :func:`django.urls.re_path`.
.. versionchanged:: 3.0
In older versions, the keyword arguments with ``None`` values are
made up also for not provided named parts.
#. If no URL pattern matches, or if an exception is raised during any #. If no URL pattern matches, or if an exception is raised during any
point in this process, Django invokes an appropriate point in this process, Django invokes an appropriate
error-handling view. See `Error handling`_ below. error-handling view. See `Error handling`_ below.

View File

@ -1854,10 +1854,6 @@ You would typically want to use both: :func:`django.utils.translation.activate()
changes the language for this thread, and setting the cookie makes this changes the language for this thread, and setting the cookie makes this
preference persist in future requests. preference persist in future requests.
.. versionchanged:: 3.0
In older versions, you could set the language in the current session.
Using translations outside views and templates Using translations outside views and templates
---------------------------------------------- ----------------------------------------------

View File

@ -693,10 +693,6 @@ Python logging module.
} }
}, },
.. versionadded:: 3.0
The ``reporter_class`` argument was added.
.. method:: send_mail(subject, message, *args, **kwargs) .. method:: send_mail(subject, message, *args, **kwargs)
Sends emails to admin users. To customize this behavior, you can Sends emails to admin users. To customize this behavior, you can

View File

@ -132,10 +132,6 @@ Use the ``django.test.Client`` class to make requests.
exceptions raised during the request should also be raised in the test. exceptions raised during the request should also be raised in the test.
Defaults to ``True``. Defaults to ``True``.
.. versionadded:: 3.0
The ``raise_request_exception`` argument was added.
Once you have a ``Client`` instance, you can call any of the following Once you have a ``Client`` instance, you can call any of the following
methods: methods:
@ -481,8 +477,6 @@ Specifically, a ``Response`` object has the following attributes:
.. attribute:: exc_info .. attribute:: exc_info
.. versionadded:: 3.0
A tuple of three values that provides information about the unhandled A tuple of three values that provides information about the unhandled
exception, if any, that occurred during the view. exception, if any, that occurred during the view.