mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Removed versionadded/changed annotations for 3.0.
This commit is contained in:
		| @@ -99,8 +99,6 @@ and underscores from the original filename, removing everything else. | ||||
|  | ||||
| .. method:: get_alternative_name(file_root, file_ext) | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Returns an alternative filename based on the ``file_root`` and ``file_ext`` | ||||
| parameters. By default, an underscore plus a random 7 character alphanumeric | ||||
| string is appended to the filename before the extension. | ||||
|   | ||||
| @@ -72,11 +72,6 @@ this header instead, set the :setting:`X_FRAME_OPTIONS` setting:: | ||||
|  | ||||
|     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 | ||||
| ``X-Frame-Options`` header set. For those cases, you can use a view decorator | ||||
| that tells the middleware not to set the header:: | ||||
|   | ||||
| @@ -1649,8 +1649,6 @@ templates used by the :class:`ModelAdmin` views: | ||||
|  | ||||
| .. method:: ModelAdmin.get_inlines(request, obj) | ||||
|  | ||||
|     .. versionadded:: 3.0 | ||||
|  | ||||
|     The ``get_inlines`` method is given the ``HttpRequest`` and the | ||||
|     ``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 | ||||
| @@ -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 | ||||
| ``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 | ||||
|  | ||||
|     jQuery was upgraded from 3.4.1 to 3.5.1. | ||||
|   | ||||
| @@ -194,8 +194,6 @@ Methods | ||||
|  | ||||
|     .. method:: get_user_permissions(obj=None) | ||||
|  | ||||
|         .. versionadded:: 3.0 | ||||
|  | ||||
|         Returns a set of permission strings that the user has directly. | ||||
|  | ||||
|         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 | ||||
|         :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) | ||||
|  | ||||
|         .. versionadded:: 3.0 | ||||
|  | ||||
|         Returns users that have the given permission ``perm`` either in the | ||||
|         ``"<app label>.<permission codename>"`` format or as a | ||||
|         :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 | ||||
|  | ||||
|     .. versionadded:: 3.0 | ||||
|  | ||||
|     A base class that provides default implementations for all required | ||||
|     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) | ||||
|  | ||||
|         .. versionadded:: 3.0 | ||||
|  | ||||
|         Returns all active users who have the permission ``perm`` either in | ||||
|         the form of ``"<app label>.<permission codename>"`` or a | ||||
|         :class:`~django.contrib.auth.models.Permission` instance. Returns an | ||||
|   | ||||
| @@ -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 | ||||
| functions are not as rich as other backends like PostGIS. | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     Support for spatial functions operating on real geometries was added. | ||||
|  | ||||
| .. warning:: | ||||
|  | ||||
|     True spatial indexes (R-trees) are only supported with | ||||
|   | ||||
| @@ -361,8 +361,6 @@ __ https://en.wikipedia.org/wiki/Geohash | ||||
|  | ||||
| .. class:: GeometryDistance(expr1, expr2, **extra) | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| *Availability*: `PostGIS <https://postgis.net/docs/geometry_distance_knn.html>`__ | ||||
|  | ||||
| Accepts two geographic fields or expressions and returns the distance between | ||||
|   | ||||
| @@ -86,10 +86,6 @@ Keyword Arguments    Description | ||||
|                      the :setting:`GEOIP_CITY` setting. | ||||
| ===================  ======================================================= | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     Support for :class:`pathlib.Path` ``path`` was added. | ||||
|  | ||||
| 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 | ||||
| with ``path`` keyword when initializing the :class:`GeoIP2` object. | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     Support for :class:`pathlib.Path` was added. | ||||
|  | ||||
| .. setting:: GEOIP_COUNTRY | ||||
|  | ||||
| ``GEOIP_COUNTRY`` | ||||
|   | ||||
| @@ -156,11 +156,6 @@ MySQL       ``ST_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 | ||||
|  | ||||
| ``contains_properly`` | ||||
| @@ -251,10 +246,6 @@ MySQL       ``ST_Crosses(poly, geom)`` | ||||
| SpatiaLite  ``Crosses(poly, geom)`` | ||||
| ==========  ========================== | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     MySQL support was added. | ||||
|  | ||||
| .. fieldlookup:: disjoint | ||||
|  | ||||
| ``disjoint`` | ||||
| @@ -279,11 +270,6 @@ MySQL       ``ST_Disjoint(poly, geom)`` | ||||
| SpatiaLite  ``Disjoint(poly, geom)`` | ||||
| ==========  ================================================= | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     In older versions, MySQL uses ``MBRDisjoint`` and operates only on bounding | ||||
|     boxes. | ||||
|  | ||||
| .. fieldlookup:: equals | ||||
|  | ||||
| ``equals`` | ||||
| @@ -308,11 +294,6 @@ MySQL       ``ST_Equals(poly, geom)`` | ||||
| SpatiaLite  ``Equals(poly, geom)`` | ||||
| ==========  ================================================= | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     In older versions, MySQL uses ``MBREquals`` and operates only on bounding | ||||
|     boxes. | ||||
|  | ||||
| .. fieldlookup:: exact | ||||
|     :noindex: | ||||
| .. fieldlookup:: same_as | ||||
| @@ -341,11 +322,6 @@ MySQL       ``ST_Equals(poly, geom)`` | ||||
| SpatiaLite  ``Equals(poly, geom)`` | ||||
| ==========  ================================================= | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     In older versions, MySQL uses ``MBREquals`` and operates only on bounding | ||||
|     boxes. | ||||
|  | ||||
| .. fieldlookup:: intersects | ||||
|  | ||||
| ``intersects`` | ||||
| @@ -370,11 +346,6 @@ MySQL       ``ST_Intersects(poly, geom)`` | ||||
| SpatiaLite  ``Intersects(poly, geom)`` | ||||
| ==========  ================================================= | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     In older versions, MySQL uses ``MBRIntersects`` and operates only on | ||||
|     bounding boxes. | ||||
|  | ||||
| .. fieldlookup:: isvalid | ||||
|  | ||||
| ``isvalid`` | ||||
| @@ -416,11 +387,6 @@ MySQL       ``ST_Overlaps(poly, geom)`` | ||||
| SpatiaLite  ``Overlaps(poly, geom)`` | ||||
| ==========  ============================ | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     In older versions, MySQL uses ``MBROverlaps`` and operates only on bounding | ||||
|     boxes. | ||||
|  | ||||
| .. fieldlookup:: relate | ||||
|  | ||||
| ``relate`` | ||||
| @@ -521,11 +487,6 @@ Oracle      ``SDO_TOUCH(poly, geom)`` | ||||
| SpatiaLite  ``Touches(poly, geom)`` | ||||
| ==========  ========================== | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     In older versions, MySQL uses ``MBRTouches`` and operates only on bounding | ||||
|     boxes. | ||||
|  | ||||
| .. fieldlookup:: within | ||||
|  | ||||
| ``within`` | ||||
| @@ -550,11 +511,6 @@ Oracle      ``SDO_INSIDE(poly, geom)`` | ||||
| SpatiaLite  ``Within(poly, geom)`` | ||||
| ==========  ========================== | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     In older versions, MySQL uses ``MBRWithin`` and operates only on bounding | ||||
|     boxes. | ||||
|  | ||||
| .. fieldlookup:: left | ||||
|  | ||||
| ``left`` | ||||
|   | ||||
| @@ -78,11 +78,6 @@ e.g. with the ``'de'`` language: | ||||
| * ``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 | ||||
|  | ||||
|     Support for negative integers was added. | ||||
|   | ||||
| @@ -12,8 +12,6 @@ PostgreSQL supports additional data integrity constraints available from the | ||||
| ``ExclusionConstraint`` | ||||
| ======================= | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| .. class:: ExclusionConstraint(*, name, expressions, index_type=None, condition=None, deferrable=None) | ||||
|  | ||||
|     Creates an exclusion constraint in the database. Internally, PostgreSQL | ||||
|   | ||||
| @@ -889,8 +889,6 @@ types. | ||||
| Range operators | ||||
| --------------- | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| .. class:: RangeOperators | ||||
|  | ||||
| PostgreSQL provides a set of SQL operators that can be used together with the | ||||
| @@ -917,8 +915,6 @@ corresponding lookups. | ||||
| RangeBoundary() expressions | ||||
| --------------------------- | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| .. class:: RangeBoundary(inclusive_lower=True, inclusive_upper=False) | ||||
|  | ||||
|     .. attribute:: inclusive_lower | ||||
|   | ||||
| @@ -111,8 +111,6 @@ run the query ``CREATE EXTENSION IF NOT EXISTS hstore;``. | ||||
| Index concurrent operations | ||||
| =========================== | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| PostgreSQL supports the ``CONCURRENTLY`` option to ``CREATE INDEX`` and | ||||
| ``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 | ||||
|   | ||||
| @@ -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 | ||||
| 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 | ||||
| ---- | ||||
|  | ||||
|   | ||||
| @@ -287,8 +287,6 @@ non-durable <https://www.postgresql.org/docs/current/non-durability.html>`_. | ||||
| MariaDB notes | ||||
| ============= | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Django supports MariaDB 10.2 and higher. | ||||
|  | ||||
| To use MariaDB, use the MySQL backend, which is shared between the two. See the | ||||
|   | ||||
| @@ -175,8 +175,6 @@ Example usage:: | ||||
|  | ||||
| .. django-admin-option:: --ignore PATTERN, -i PATTERN | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Ignores directories matching the given :mod:`glob`-style pattern. Use | ||||
| multiple times to ignore more. | ||||
|  | ||||
| @@ -1131,10 +1129,6 @@ under them. | ||||
|  | ||||
| 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 | ||||
|  | ||||
| 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 | ||||
|  | ||||
| .. 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 | ||||
|  | ||||
| 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 | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| 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. | ||||
|  | ||||
| @@ -1501,8 +1488,6 @@ Runs test methods and classes matching test name patterns, in the same way as | ||||
|  | ||||
| .. django-admin-option:: --pdb | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Spawns a ``pdb`` debugger at each test error or failure. If you have it | ||||
| 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`` | ||||
| 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 | ||||
|  | ||||
| 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 | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Skips running system checks prior to running the command. This option is only | ||||
| available if the | ||||
| :attr:`~django.core.management.BaseCommand.requires_system_checks` command | ||||
|   | ||||
| @@ -167,8 +167,6 @@ list of errors. | ||||
|  | ||||
| .. exception:: RequestAborted | ||||
|  | ||||
|     .. versionadded:: 3.0 | ||||
|  | ||||
|     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, | ||||
|     or when the client does not send data and hits a timeout where the server | ||||
| @@ -184,8 +182,6 @@ list of errors. | ||||
|  | ||||
| .. exception:: SynchronousOnlyOperation | ||||
|  | ||||
|     .. versionadded:: 3.0 | ||||
|  | ||||
|     The :exc:`SynchronousOnlyOperation` exception is raised when code that | ||||
|     is only allowed in synchronous Python code is called from an asynchronous | ||||
|     context (a thread with a running asynchronous event loop). These parts of | ||||
|   | ||||
| @@ -112,8 +112,6 @@ The ``Storage`` class | ||||
|  | ||||
|     .. method:: get_alternative_name(file_root, file_ext) | ||||
|  | ||||
|         .. versionadded:: 3.0 | ||||
|  | ||||
|         Returns an alternative filename based on the ``file_root`` and | ||||
|         ``file_ext`` parameters, an underscore plus a random 7 character | ||||
|         alphanumeric string is appended to the filename before the extension. | ||||
|   | ||||
| @@ -247,8 +247,6 @@ __ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Se | ||||
| Referrer Policy | ||||
| ~~~~~~~~~~~~~~~ | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| 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 | ||||
| full URL of the linking page as the referrer. While this can be useful for some | ||||
|   | ||||
| @@ -48,10 +48,6 @@ objects that have an ``output_field`` that is a | ||||
| :class:`~django.db.models.BooleanField`. The result is provided using the | ||||
| ``then`` keyword. | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     Support for boolean :class:`~django.db.models.Expression` was added. | ||||
|  | ||||
| Some examples:: | ||||
|  | ||||
|     >>> 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 | ||||
| ------------------ | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| 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`` | ||||
| columns, but you can still use it to filter results:: | ||||
|   | ||||
| @@ -69,10 +69,6 @@ ensures the age field is never less than 18. | ||||
|  | ||||
| The name of the constraint. | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|    Interpolation of  ``'%(app_label)s'`` and ``'%(class)s'`` was added. | ||||
|  | ||||
| ``UniqueConstraint`` | ||||
| ==================== | ||||
|  | ||||
| @@ -99,10 +95,6 @@ date. | ||||
|  | ||||
| The name of the constraint. | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|    Interpolation of  ``'%(app_label)s'`` and ``'%(class)s'`` was added. | ||||
|  | ||||
| ``condition`` | ||||
| ------------- | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
| ``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 | ||||
| return: | ||||
|  | ||||
| @@ -1120,8 +1116,6 @@ It can also be registered as a transform. For example:: | ||||
|  | ||||
| .. class:: Sign(expression, **extra) | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Returns the sign (-1, 0, 1) of a numeric field or expression. | ||||
|  | ||||
| Usage example:: | ||||
| @@ -1357,8 +1351,6 @@ spaces. | ||||
|  | ||||
| .. class:: MD5(expression, **extra) | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Accepts a single text field or expression and returns the MD5 hash of the | ||||
| string. | ||||
|  | ||||
| @@ -1489,8 +1481,6 @@ spaces. | ||||
| .. class:: SHA384(expression, **extra) | ||||
| .. class:: SHA512(expression, **extra) | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Accepts a single text field or expression and returns the particular hash of | ||||
| the string. | ||||
|  | ||||
|   | ||||
| @@ -641,13 +641,6 @@ directly filter a queryset:: | ||||
| This will ensure that the subquery will not be added to the ``SELECT`` columns, | ||||
| 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 | ||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
|  | ||||
| @@ -995,10 +988,6 @@ calling the appropriate methods on the wrapped expression. | ||||
|         to a column. The ``alias`` parameter will be ``None`` unless the | ||||
|         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) | ||||
|  | ||||
|         Returns the expression ready to be sorted in ascending order. | ||||
|   | ||||
| @@ -301,10 +301,6 @@ There are some additional caveats to be aware of: | ||||
|  | ||||
|         __empty__ = _('(Unknown)') | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
|    The ``TextChoices``, ``IntegerChoices``, and ``Choices`` classes were added. | ||||
|  | ||||
| ``db_column`` | ||||
| ------------- | ||||
|  | ||||
| @@ -816,10 +812,6 @@ Has two optional arguments: | ||||
|         class MyModel(models.Model): | ||||
|             upload = models.FileField(upload_to=user_directory_path) | ||||
|  | ||||
|     .. versionchanged:: 3.0 | ||||
|  | ||||
|         Support for :class:`pathlib.Path` was added. | ||||
|  | ||||
| .. attribute:: FileField.storage | ||||
|  | ||||
|     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): | ||||
|             file = models.FilePathField(path=images_path) | ||||
|  | ||||
|     .. versionchanged:: 3.0 | ||||
|  | ||||
|         ``path`` can now be a callable. | ||||
|  | ||||
| .. attribute:: FilePathField.match | ||||
|  | ||||
|     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) | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Like an :class:`AutoField`, but only allows values under a certain | ||||
| (database-dependent) limit. Values from ``1`` to ``32767`` are safe in all | ||||
| databases supported by Django. | ||||
| @@ -1820,11 +1806,6 @@ that control how the relationship functions. | ||||
|     add the descriptor for the reverse relationship, allowing | ||||
|     :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 | ||||
|  | ||||
|     Django will automatically generate a table to manage many-to-many | ||||
| @@ -2078,8 +2059,6 @@ Field API reference | ||||
|  | ||||
|     .. attribute:: descriptor_class | ||||
|  | ||||
|         .. versionadded:: 3.0 | ||||
|  | ||||
|         A class implementing the :py:ref:`descriptor protocol <descriptors>` | ||||
|         that is instantiated and assigned to the model instance attribute. The | ||||
|         constructor must accept a single argument, the ``Field`` instance. | ||||
|   | ||||
| @@ -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'], | ||||
|     name='%(app_label)s_%(class)s_title_index')``. | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     Interpolation of  ``'%(app_label)s'`` and ``'%(class)s'`` was added. | ||||
|  | ||||
| ``db_tablespace`` | ||||
| ----------------- | ||||
|  | ||||
|   | ||||
| @@ -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` | ||||
| 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: | ||||
|  | ||||
| Forcing an INSERT or UPDATE | ||||
|   | ||||
| @@ -3455,10 +3455,6 @@ by the aggregate. | ||||
|         This is the SQL equivalent of ``AVG(DISTINCT <field>)``. The default | ||||
|         value is ``False``. | ||||
|  | ||||
|     .. versionchanged:: 3.0 | ||||
|  | ||||
|         Support for ``distinct=True`` was added. | ||||
|  | ||||
| ``Count`` | ||||
| ~~~~~~~~~ | ||||
|  | ||||
| @@ -3534,10 +3530,6 @@ by the aggregate. | ||||
|         the SQL equivalent of ``SUM(DISTINCT <field>)``. The default value is | ||||
|         ``False``. | ||||
|  | ||||
|     .. versionchanged:: 3.0 | ||||
|  | ||||
|         Support for ``distinct=True`` was added. | ||||
|  | ||||
| ``Variance`` | ||||
| ~~~~~~~~~~~~ | ||||
|  | ||||
|   | ||||
| @@ -202,10 +202,6 @@ All attributes should be considered read-only, unless stated otherwise. | ||||
|  | ||||
|         {{ request.headers.user_agent }} | ||||
|  | ||||
|     .. versionchanged:: 3.0 | ||||
|  | ||||
|         Support for lookups using underscores was added. | ||||
|  | ||||
| .. attribute:: HttpRequest.resolver_match | ||||
|  | ||||
|     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(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 | ||||
| file-like object:: | ||||
|  | ||||
| @@ -812,10 +804,6 @@ Methods | ||||
|     given it will be extracted from ``content_type``, and if that | ||||
|     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) | ||||
|  | ||||
|     Sets the given header name to the given value. Both ``header`` and | ||||
|   | ||||
| @@ -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 | ||||
|     get totally incorrect behavior. | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     In older versions, the default value is ``None``. | ||||
|  | ||||
| .. setting:: FILE_UPLOAD_TEMP_DIR | ||||
|  | ||||
| ``FILE_UPLOAD_TEMP_DIR`` | ||||
| @@ -1823,8 +1819,6 @@ deletes the old one. | ||||
| ``LANGUAGE_COOKIE_HTTPONLY`` | ||||
| ---------------------------- | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Default: ``False`` | ||||
|  | ||||
| Whether to use ``HttpOnly`` flag on the language cookie. If this is set to | ||||
| @@ -1872,8 +1866,6 @@ deletes the one. | ||||
| ``LANGUAGE_COOKIE_SAMESITE`` | ||||
| ---------------------------- | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Default: ``None`` | ||||
|  | ||||
| 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`` | ||||
| -------------------------- | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Default: ``False`` | ||||
|  | ||||
| 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 | ||||
| already have it. | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     In older versions, the default value is ``False``. | ||||
|  | ||||
| .. setting:: 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`` | ||||
| -------------------------- | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| Default: ``'same-origin'`` | ||||
|  | ||||
| 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 | ||||
| :doc:`clickjacking protection </ref/clickjacking/>` documentation. | ||||
|  | ||||
| .. versionchanged:: 3.0 | ||||
|  | ||||
|     In older versions, the default value is ``SAMEORIGIN``. | ||||
|  | ||||
| Auth | ||||
| ==== | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
|     cached. | ||||
|  | ||||
|     .. versionchanged:: 3.0 | ||||
|  | ||||
|         ``private`` directive was added. | ||||
|  | ||||
| .. function:: patch_vary_headers(response, newheaders) | ||||
|  | ||||
|     Adds (or updates) the ``Vary`` header in the given ``HttpResponse`` object. | ||||
|     ``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 | ||||
|     asterisk ``'*'``. Otherwise, existing headers in ``Vary`` aren't removed. | ||||
|  | ||||
|     .. versionchanged:: 3.0 | ||||
|  | ||||
|         Handling an asterisk ``'*'`` according to :rfc:`7231#section-7.1.4` was | ||||
|         added. | ||||
|     asterisk ``'*'``, according to :rfc:`7231#section-7.1.4`. Otherwise, | ||||
|     existing headers in ``Vary`` aren't removed. | ||||
|  | ||||
| .. 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 | ||||
|     :func:`~django.utils.safestring.mark_safe` applied. | ||||
|  | ||||
|     .. versionchanged:: 3.0 | ||||
|  | ||||
|         In older versions, ``'`` is converted to its decimal code ``'`` | ||||
|         instead of the equivalent hex code ``'``. | ||||
|  | ||||
| .. function:: conditional_escape(text) | ||||
|  | ||||
|     Similar to ``escape()``, except that it doesn't operate on pre-escaped | ||||
|   | ||||
| @@ -2,8 +2,6 @@ | ||||
| Asynchronous support | ||||
| ==================== | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| .. currentmodule:: asgiref.sync | ||||
|  | ||||
| Django has support for writing asynchronous ("async") views, along with an | ||||
|   | ||||
| @@ -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 | ||||
|         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 | ||||
|         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) | ||||
|  | ||||
|         .. versionadded:: 3.0 | ||||
|  | ||||
|         Returns a set of permission strings that the user has directly. | ||||
|  | ||||
|         If ``obj`` is passed in, only returns the user permissions for this | ||||
|   | ||||
| @@ -1398,10 +1398,6 @@ implementation details see :ref:`using-the-views`. | ||||
|     * ``reset_url_token``: Token parameter displayed as a component of password | ||||
|       reset URLs. Defaults to ``'set-password'``. | ||||
|  | ||||
|       .. versionchanged:: 3.0 | ||||
|  | ||||
|         The ``reset_url_token`` class attribute was added. | ||||
|  | ||||
|     **Template context:** | ||||
|  | ||||
|     * ``form``: The form (see ``form_class`` above) for setting the new user's | ||||
|   | ||||
| @@ -459,8 +459,6 @@ control the widget used with | ||||
| ``ordering_widget`` | ||||
| ^^^^^^^^^^^^^^^^^^^ | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| .. attribute:: BaseFormSet.ordering_widget | ||||
|  | ||||
| Default: :class:`~django.forms.NumberInput` | ||||
| @@ -478,8 +476,6 @@ Set ``ordering_widget`` to specify the widget class to be used with | ||||
| ``get_ordering_widget`` | ||||
| ^^^^^^^^^^^^^^^^^^^^^^^ | ||||
|  | ||||
| .. versionadded:: 3.0 | ||||
|  | ||||
| .. method:: BaseFormSet.get_ordering_widget() | ||||
|  | ||||
| Override ``get_ordering_widget()`` if you need to provide a widget instance for | ||||
|   | ||||
| @@ -121,7 +121,3 @@ client-side caching. | ||||
|     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 | ||||
|     should never be cached. | ||||
|  | ||||
|     .. versionchanged:: 3.0 | ||||
|  | ||||
|         ``private`` directive was added. | ||||
|   | ||||
| @@ -246,8 +246,6 @@ You can edit it multiple times. | ||||
|  | ||||
|     .. method:: get_session_cookie_age() | ||||
|  | ||||
|       .. versionadded:: 3.0 | ||||
|  | ||||
|       Returns the age of session cookies, in seconds. Defaults to | ||||
|       :setting:`SESSION_COOKIE_AGE`. | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
|      :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 | ||||
|    point in this process, Django invokes an appropriate | ||||
|    error-handling view. See `Error handling`_ below. | ||||
|   | ||||
| @@ -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 | ||||
| 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 | ||||
| ---------------------------------------------- | ||||
|  | ||||
|   | ||||
| @@ -693,10 +693,6 @@ Python logging module. | ||||
|             } | ||||
|         }, | ||||
|  | ||||
|     .. versionadded:: 3.0 | ||||
|  | ||||
|         The ``reporter_class`` argument was added. | ||||
|  | ||||
|     .. method:: send_mail(subject, message, *args, **kwargs) | ||||
|  | ||||
|         Sends emails to admin users. To customize this behavior, you can | ||||
|   | ||||
| @@ -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. | ||||
|     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 | ||||
|     methods: | ||||
|  | ||||
| @@ -481,8 +477,6 @@ Specifically, a ``Response`` object has the following attributes: | ||||
|  | ||||
|     .. attribute:: exc_info | ||||
|  | ||||
|         .. versionadded:: 3.0 | ||||
|  | ||||
|         A tuple of three values that provides information about the unhandled | ||||
|         exception, if any, that occurred during the view. | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user