mirror of
https://github.com/django/django.git
synced 2025-09-18 06:59:12 +00:00
Removed versionadded/changed annotations for 5.2.
This commit is contained in:
parent
1db79d8acf
commit
00a84fc6f3
@ -324,8 +324,6 @@ the :meth:`~BaseCommand.handle` method must be implemented.
|
||||
|
||||
.. method:: BaseCommand.get_check_kwargs(options)
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
Supplies kwargs for the call to :meth:`check`, including transforming the
|
||||
value of :attr:`requires_system_checks` to the ``tag`` kwarg.
|
||||
|
||||
|
@ -17,8 +17,6 @@ existing ``shell`` management command. For more details, refer to the guide on
|
||||
Customize automatic imports
|
||||
===========================
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
To customize the automatic import behavior of the :djadmin:`shell` management
|
||||
command, override the ``get_auto_imports()`` method. This method should return
|
||||
a sequence of import paths for objects or modules available in the application.
|
||||
|
@ -503,8 +503,6 @@ you see fit:
|
||||
Simple block tags
|
||||
-----------------
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
.. method:: django.template.Library.simple_block_tag()
|
||||
|
||||
When a section of rendered template needs to be passed into a custom tag,
|
||||
|
@ -285,10 +285,6 @@ following attributes and methods:
|
||||
|
||||
re.compile(r"API|AUTH|TOKEN|KEY|SECRET|PASS|SIGNATURE|HTTP_COOKIE", flags=re.IGNORECASE)
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The term ``AUTH`` was added.
|
||||
|
||||
.. method:: is_active(request)
|
||||
|
||||
Returns ``True`` to activate the filtering in
|
||||
|
@ -52,10 +52,6 @@ Templates ``:template:`path/to/template.html```
|
||||
Each of these support custom link text with the format
|
||||
``:role:`link text <link>```. For example, ``:tag:`block <built_in-block>```.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
Support for custom link text was added.
|
||||
|
||||
.. _admindocs-model-reference:
|
||||
|
||||
Model reference
|
||||
@ -89,11 +85,6 @@ A model with useful documentation might look like this::
|
||||
"""Makes the blog entry live on the site."""
|
||||
...
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
Access was restricted to only allow users with model view or change
|
||||
permissions.
|
||||
|
||||
View reference
|
||||
==============
|
||||
|
||||
|
@ -2874,8 +2874,6 @@ is linked to the document in ``{% block dark-mode-vars %}``.
|
||||
``extrabody`` block
|
||||
===================
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
You can add custom HTML, JavaScript, or other content to appear just before the
|
||||
closing ``</body>`` tag of templates that extend ``admin/base.html`` by
|
||||
extending the ``extrabody`` block. For example, if you want an alert to appear
|
||||
|
@ -206,10 +206,6 @@ Methods
|
||||
If ``obj`` is passed in, only returns the user permissions for this
|
||||
specific object.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aget_user_permissions()`` method was added.
|
||||
|
||||
.. method:: get_group_permissions(obj=None)
|
||||
.. method:: aget_group_permissions(obj=None)
|
||||
|
||||
@ -221,10 +217,6 @@ Methods
|
||||
If ``obj`` is passed in, only returns the group permissions for
|
||||
this specific object.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aget_group_permissions()`` method was added.
|
||||
|
||||
.. method:: get_all_permissions(obj=None)
|
||||
.. method:: aget_all_permissions(obj=None)
|
||||
|
||||
@ -236,10 +228,6 @@ Methods
|
||||
If ``obj`` is passed in, only returns the permissions for this
|
||||
specific object.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aget_all_permissions()`` method was added.
|
||||
|
||||
.. method:: has_perm(perm, obj=None)
|
||||
.. method:: ahas_perm(perm, obj=None)
|
||||
|
||||
@ -254,10 +242,6 @@ Methods
|
||||
If ``obj`` is passed in, this method won't check for a permission for
|
||||
the model, but for this specific object.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``ahas_perm()`` method was added.
|
||||
|
||||
.. method:: has_perms(perm_list, obj=None)
|
||||
.. method:: ahas_perms(perm_list, obj=None)
|
||||
|
||||
@ -272,10 +256,6 @@ Methods
|
||||
If ``obj`` is passed in, this method won't check for permissions for
|
||||
the model, but for the specific object.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``ahas_perms()`` method was added.
|
||||
|
||||
.. method:: has_module_perms(package_name)
|
||||
.. method:: ahas_module_perms(package_name)
|
||||
|
||||
@ -286,10 +266,6 @@ Methods
|
||||
always return ``False``. For an active superuser, this method will
|
||||
always return ``True``.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``ahas_module_perms()`` method was added.
|
||||
|
||||
.. method:: email_user(subject, message, from_email=None, **kwargs)
|
||||
|
||||
Sends an email to the user. If ``from_email`` is ``None``, Django uses
|
||||
@ -334,10 +310,6 @@ Manager methods
|
||||
See :ref:`Creating users <topics-auth-creating-users>` for example
|
||||
usage.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``acreate_user()`` method was added.
|
||||
|
||||
.. method:: create_superuser(username, email=None, password=None, **extra_fields)
|
||||
.. method:: acreate_superuser(username, email=None, password=None, **extra_fields)
|
||||
|
||||
@ -346,10 +318,6 @@ Manager methods
|
||||
Same as :meth:`create_user`, but sets :attr:`~models.User.is_staff` and
|
||||
:attr:`~models.User.is_superuser` to ``True``.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``acreate_superuser()`` method was added.
|
||||
|
||||
.. method:: with_perm(perm, is_active=True, include_superusers=True, backend=None, obj=None)
|
||||
|
||||
Returns users that have the given permission ``perm`` either in the
|
||||
@ -566,10 +534,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
|
||||
Returns an empty set.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aget_user_permissions()`` function was added.
|
||||
|
||||
.. method:: get_group_permissions(user_obj, obj=None)
|
||||
.. method:: aget_group_permissions(user_obj, obj=None)
|
||||
|
||||
@ -577,10 +541,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
|
||||
Returns an empty set.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aget_group_permissions()`` function was added.
|
||||
|
||||
.. method:: get_all_permissions(user_obj, obj=None)
|
||||
.. method:: aget_all_permissions(user_obj, obj=None)
|
||||
|
||||
@ -589,10 +549,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
Uses :meth:`get_user_permissions` and :meth:`get_group_permissions` to
|
||||
get the set of permission strings the ``user_obj`` has.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aget_all_permissions()`` function was added.
|
||||
|
||||
.. method:: has_perm(user_obj, perm, obj=None)
|
||||
.. method:: ahas_perm(user_obj, perm, obj=None)
|
||||
|
||||
@ -601,10 +557,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
Uses :meth:`get_all_permissions` to check if ``user_obj`` has the
|
||||
permission string ``perm``.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``ahas_perm()`` function was added.
|
||||
|
||||
.. class:: ModelBackend
|
||||
|
||||
This is the default authentication backend used by Django. It
|
||||
@ -644,10 +596,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
if it wasn't provided to :func:`~django.contrib.auth.authenticate`
|
||||
(which passes it on to the backend).
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aauthenticate()`` function was added.
|
||||
|
||||
.. method:: get_user_permissions(user_obj, obj=None)
|
||||
.. method:: aget_user_permissions(user_obj, obj=None)
|
||||
|
||||
@ -658,10 +606,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
:attr:`~django.contrib.auth.models.AbstractBaseUser.is_anonymous` or
|
||||
:attr:`~django.contrib.auth.models.CustomUser.is_active` is ``False``.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aget_user_permissions()`` function was added.
|
||||
|
||||
.. method:: get_group_permissions(user_obj, obj=None)
|
||||
.. method:: aget_group_permissions(user_obj, obj=None)
|
||||
|
||||
@ -672,10 +616,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
:attr:`~django.contrib.auth.models.AbstractBaseUser.is_anonymous` or
|
||||
:attr:`~django.contrib.auth.models.CustomUser.is_active` is ``False``.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aget_group_permissions()`` function was added.
|
||||
|
||||
.. method:: get_all_permissions(user_obj, obj=None)
|
||||
.. method:: aget_all_permissions(user_obj, obj=None)
|
||||
|
||||
@ -686,10 +626,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
:attr:`~django.contrib.auth.models.AbstractBaseUser.is_anonymous` or
|
||||
:attr:`~django.contrib.auth.models.CustomUser.is_active` is ``False``.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aget_all_permissions()`` function was added.
|
||||
|
||||
.. method:: has_perm(user_obj, perm, obj=None)
|
||||
.. method:: ahas_perm(user_obj, perm, obj=None)
|
||||
|
||||
@ -699,10 +635,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
permission string ``perm``. Returns ``False`` if the user is not
|
||||
:attr:`~django.contrib.auth.models.CustomUser.is_active`.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``ahas_perm()`` function was added.
|
||||
|
||||
.. method:: has_module_perms(user_obj, app_label)
|
||||
.. method:: ahas_module_perms(user_obj, app_label)
|
||||
|
||||
@ -711,10 +643,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
Returns whether the ``user_obj`` has any permissions on the app
|
||||
``app_label``.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``ahas_module_perms()`` function was added.
|
||||
|
||||
.. method:: user_can_authenticate()
|
||||
|
||||
Returns whether the user is allowed to authenticate. To match the
|
||||
@ -786,10 +714,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
if it wasn't provided to :func:`~django.contrib.auth.authenticate`
|
||||
(which passes it on to the backend).
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aauthenticate()`` function was added.
|
||||
|
||||
.. method:: clean_username(username)
|
||||
|
||||
Performs any cleaning on the ``username`` (e.g. stripping LDAP DN
|
||||
@ -818,10 +742,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`:
|
||||
if it wasn't provided to :func:`~django.contrib.auth.authenticate`
|
||||
(which passes it on to the backend).
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aconfigure_user()`` function was added.
|
||||
|
||||
.. method:: user_can_authenticate()
|
||||
|
||||
Returns whether the user is allowed to authenticate. This method
|
||||
|
@ -600,21 +600,15 @@ coordinate transformation:
|
||||
|
||||
.. attribute:: has_curve
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
A boolean indicating if this geometry is or contains a curve geometry.
|
||||
|
||||
.. method:: get_linear_geometry
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
Returns a linear version of the geometry. If no conversion can be made, the
|
||||
original geometry is returned.
|
||||
|
||||
.. method:: get_curve_geometry
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
Returns a curved version of the geometry. If no conversion can be made, the
|
||||
original geometry is returned.
|
||||
|
||||
|
@ -205,10 +205,6 @@ MySQL ``MBRCoveredBy(poly, geom)``
|
||||
SpatiaLite ``CoveredBy(poly, geom)``
|
||||
========== =============================
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
MySQL support was added.
|
||||
|
||||
.. versionchanged:: 6.0
|
||||
|
||||
MariaDB 12.0.1+ support was added.
|
||||
@ -237,10 +233,6 @@ MySQL ``MBRCovers(poly, geom)``
|
||||
SpatiaLite ``Covers(poly, geom)``
|
||||
========== ==========================
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
MySQL support was added.
|
||||
|
||||
.. fieldlookup:: crosses
|
||||
|
||||
``crosses``
|
||||
|
@ -42,8 +42,6 @@ General-purpose aggregation functions
|
||||
|
||||
.. attribute:: order_by
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
An optional string of a field name (with an optional ``"-"`` prefix
|
||||
which indicates descending order) or an expression (or a tuple or list
|
||||
of strings and/or expressions) that specifies the ordering of the
|
||||
@ -149,8 +147,6 @@ General-purpose aggregation functions
|
||||
|
||||
.. attribute:: order_by
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
An optional string of a field name (with an optional ``"-"`` prefix
|
||||
which indicates descending order) or an expression (or a tuple or list
|
||||
of strings and/or expressions) that specifies the ordering of the
|
||||
@ -210,8 +206,6 @@ General-purpose aggregation functions
|
||||
|
||||
.. attribute:: order_by
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
An optional string of a field name (with an optional ``"-"`` prefix
|
||||
which indicates descending order) or an expression (or a tuple or list
|
||||
of strings and/or expressions) that specifies the ordering of the
|
||||
|
@ -995,10 +995,6 @@ They share this interface:
|
||||
XML documents. If your content has some of them, you might encounter a
|
||||
:exc:`ValueError` when producing the feed.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The ``stylesheets`` argument was added.
|
||||
|
||||
:meth:`.SyndicationFeed.add_item`
|
||||
Add an item to the feed with the given parameters.
|
||||
|
||||
@ -1131,8 +1127,6 @@ above example should demonstrate the basic idea.
|
||||
Feed stylesheets
|
||||
----------------
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
If you wish to have your RSS feed render nicely in a browser, you will need to
|
||||
provide styling information for the XML file, typically in XSLT_ or CSS
|
||||
formats.
|
||||
|
@ -1105,8 +1105,6 @@ Example of a full DSN string::
|
||||
Connection pool
|
||||
---------------
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
To use a connection pool with `oracledb`_, set ``"pool"`` to ``True`` in the
|
||||
:setting:`OPTIONS` part of your database configuration. This uses the driver's
|
||||
`create_pool()`_ default values::
|
||||
|
@ -950,8 +950,6 @@ Uses IPv6 for the development server. This changes the default IP address from
|
||||
|
||||
.. envvar:: DJANGO_RUNSERVER_HIDE_WARNING
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
By default, a warning is printed to the console that ``runserver`` is not
|
||||
suitable for production:
|
||||
|
||||
@ -1081,10 +1079,6 @@ flag.
|
||||
See the guide on :ref:`customizing this behavior
|
||||
<customizing-shell-auto-imports>` to add or remove automatic imports.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
Automatic models import was added.
|
||||
|
||||
.. versionchanged:: 6.0
|
||||
|
||||
Automatic imports of common utilities, such as ``django.conf.settings``,
|
||||
@ -1125,8 +1119,6 @@ variable or the ``~/.pythonrc.py`` script is read.
|
||||
|
||||
.. django-admin-option:: --no-imports
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
Disables the automatic import of models from :setting:`INSTALLED_APPS`.
|
||||
|
||||
.. django-admin-option:: --command COMMAND, -c COMMAND
|
||||
|
@ -1043,10 +1043,6 @@ If the widget is rendered in a ``<fieldset>`` then ``aria-describedby`` is
|
||||
added to this element, otherwise it is added to the widget's HTML element (e.g.
|
||||
``<input>``).
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aria-describedby`` was added to associate errors with its input.
|
||||
|
||||
.. _ref-forms-error-list-format:
|
||||
|
||||
Customizing the error list format
|
||||
@ -1059,10 +1055,6 @@ Customizing the error list format
|
||||
list of errors. In addition this class has the following attributes and
|
||||
methods.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The ``field_id`` argument was added.
|
||||
|
||||
.. attribute:: error_class
|
||||
|
||||
The CSS classes to be used when rendering the error list. Any provided
|
||||
@ -1076,8 +1068,6 @@ Customizing the error list format
|
||||
|
||||
.. attribute:: field_id
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
An ``id`` for the field for which the errors relate. This allows an
|
||||
HTML ``id`` attribute to be added in the error template and is useful
|
||||
to associate the errors with the field. The default template uses the
|
||||
@ -1196,8 +1186,6 @@ Attributes of ``BoundField``
|
||||
|
||||
.. attribute:: BoundField.aria_describedby
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
Returns an ``aria-describedby`` reference to associate a field with its
|
||||
help text and errors. Returns ``None`` if ``aria-describedby`` is set in
|
||||
:attr:`Widget.attrs` to preserve the user defined attribute when rendering
|
||||
@ -1505,8 +1493,6 @@ Customizing ``BoundField``
|
||||
|
||||
.. attribute:: Form.bound_field_class
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
Define a custom :class:`~django.forms.BoundField` class to use when rendering
|
||||
the form. This takes precedence over the project-level
|
||||
:attr:`.BaseRenderer.bound_field_class` (along with a custom
|
||||
|
@ -399,8 +399,6 @@ template, see also :ref:`overriding-built-in-field-templates`.
|
||||
|
||||
.. attribute:: Field.bound_field_class
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
The ``bound_field_class`` attribute allows a per-field override of
|
||||
:attr:`.Form.bound_field_class`.
|
||||
|
||||
|
@ -67,8 +67,6 @@ should return a rendered template (as a string) or raise
|
||||
|
||||
.. attribute:: bound_field_class
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
The default class used to represent form fields across the project.
|
||||
|
||||
Defaults to :class:`.BoundField` class.
|
||||
|
@ -564,8 +564,6 @@ These widgets make use of the HTML elements ``input`` and ``textarea``.
|
||||
``ColorInput``
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
.. class:: ColorInput
|
||||
|
||||
* ``input_type``: ``'color'``
|
||||
@ -575,8 +573,6 @@ These widgets make use of the HTML elements ``input`` and ``textarea``.
|
||||
``SearchInput``
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
.. class:: SearchInput
|
||||
|
||||
* ``input_type``: ``'search'``
|
||||
@ -586,8 +582,6 @@ These widgets make use of the HTML elements ``input`` and ``textarea``.
|
||||
``TelInput``
|
||||
~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
.. class:: TelInput
|
||||
|
||||
* ``input_type``: ``'tel'``
|
||||
|
@ -278,8 +278,6 @@ Removes the constraint named ``name`` from the model with ``model_name``.
|
||||
``AlterConstraint``
|
||||
-------------------
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
.. class:: AlterConstraint(model_name, name, constraint)
|
||||
|
||||
Alters the constraint named ``name`` of the model with ``model_name`` with the
|
||||
|
@ -293,13 +293,6 @@ If :attr:`.UniqueConstraint.fields` is set without a
|
||||
code when there are multiple fields, and to the :attr:`.Field.unique` error
|
||||
code when there is a single field.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
In older versions, the provided
|
||||
:attr:`.UniqueConstraint.violation_error_code` was not used when
|
||||
:attr:`.UniqueConstraint.fields` was set without a
|
||||
:attr:`.UniqueConstraint.condition`.
|
||||
|
||||
``violation_error_message``
|
||||
---------------------------
|
||||
|
||||
@ -317,10 +310,3 @@ If :attr:`.UniqueConstraint.fields` is set without a
|
||||
:attr:`Meta.unique_together <django.db.models.Options.unique_together>` error
|
||||
message when there are multiple fields, and to the :attr:`.Field.unique` error
|
||||
message when there is a single field.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
In older versions, the provided
|
||||
:attr:`.UniqueConstraint.violation_error_message` was not used when
|
||||
:attr:`.UniqueConstraint.fields` was set without a
|
||||
:attr:`.UniqueConstraint.condition`.
|
||||
|
@ -844,8 +844,6 @@ JSON Functions
|
||||
``JSONArray``
|
||||
-------------
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
.. class:: JSONArray(*expressions)
|
||||
|
||||
Accepts a list of field names or expressions and returns a JSON array
|
||||
|
@ -1095,8 +1095,6 @@ calling the appropriate methods on the wrapped expression.
|
||||
|
||||
.. attribute:: set_returning
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
Tells Django that this expression contains a set-returning function,
|
||||
enforcing subquery evaluation. It's used, for example, to allow some
|
||||
Postgres set-returning functions (e.g. ``JSONB_PATH_QUERY``,
|
||||
@ -1105,8 +1103,6 @@ calling the appropriate methods on the wrapped expression.
|
||||
|
||||
.. attribute:: allows_composite_expressions
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
Tells Django that this expression allows composite expressions, for
|
||||
example, to support :ref:`composite primary keys
|
||||
<cpk-and-database-functions>`. Defaults to ``False``.
|
||||
|
@ -564,10 +564,6 @@ alongside the old one.
|
||||
The primary key field is set to ``None`` when
|
||||
:meth:`deleting <django.db.models.Model.delete>` an object.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The ``CompositePrimaryKey`` field was added.
|
||||
|
||||
``unique``
|
||||
----------
|
||||
|
||||
@ -716,8 +712,6 @@ isn't defined.
|
||||
``CompositePrimaryKey``
|
||||
-----------------------
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
.. class:: CompositePrimaryKey(*field_names, **options)
|
||||
|
||||
A virtual field used for defining a composite primary key.
|
||||
@ -758,10 +752,6 @@ The default form widget for this field is a :class:`~django.forms.TextInput`.
|
||||
``max_length`` for some backends. Refer to the :doc:`database backend
|
||||
notes </ref/databases>` for details.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
Support for unlimited ``VARCHAR`` columns was added on SQLite.
|
||||
|
||||
.. attribute:: CharField.db_collation
|
||||
|
||||
Optional. The database collation name of the field.
|
||||
|
@ -465,11 +465,6 @@ field or fields compose the primary key for the model. You can read and set
|
||||
this value, just as you would for any other attribute, and it will update the
|
||||
correct fields in the model.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
Support for the primary key to be composed of multiple fields was added via
|
||||
``CompositePrimaryKey``.
|
||||
|
||||
Explicitly specifying auto-primary-key values
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -983,8 +978,6 @@ Other attributes
|
||||
|
||||
.. method:: Model._is_pk_set()
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
The ``_is_pk_set()`` method returns whether the model instance's ``pk`` is set.
|
||||
It abstracts the model's primary key definition, ensuring consistent behavior
|
||||
regardless of the specific ``pk`` configuration.
|
||||
|
@ -123,8 +123,6 @@ Retrieving all field instances of a model
|
||||
Retrieving fields composing the primary key of a model
|
||||
------------------------------------------------------
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
.. attribute:: Options.pk_fields
|
||||
|
||||
Returns a list of the fields composing the primary key of a model.
|
||||
|
@ -750,11 +750,6 @@ You can also refer to fields on related models with reverse relations through
|
||||
``"true"``, ``"false"``, and ``"null"`` strings for
|
||||
:class:`~django.db.models.JSONField` key transforms.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The ``SELECT`` clause generated when using ``values()`` was updated to
|
||||
respect the order of the specified ``*fields`` and ``**expressions``.
|
||||
|
||||
``values_list()``
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -845,11 +840,6 @@ not having any author:
|
||||
``"true"``, ``"false"``, and ``"null"`` strings for
|
||||
:class:`~django.db.models.JSONField` key transforms.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The ``SELECT`` clause generated when using ``values_list()`` was updated to
|
||||
respect the order of the specified ``*fields``.
|
||||
|
||||
``dates()``
|
||||
~~~~~~~~~~~
|
||||
|
||||
@ -3125,11 +3115,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
|
||||
there are triggers or if a function is called, even for a ``SELECT`` query.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
Support for the ``memory`` and ``serialize`` options on PostgreSQL 17+ was
|
||||
added.
|
||||
|
||||
.. _field-lookups:
|
||||
|
||||
``Field`` lookups
|
||||
|
@ -429,8 +429,6 @@ Methods
|
||||
|
||||
.. method:: HttpRequest.get_preferred_type(media_types)
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
Returns the preferred mime type from ``media_types``, based on the
|
||||
``Accept`` header, or ``None`` if the client does not accept any of the
|
||||
provided types.
|
||||
@ -882,8 +880,6 @@ Attributes
|
||||
|
||||
.. attribute:: HttpResponse.text
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
A string representation of :attr:`HttpResponse.content`, decoded using the
|
||||
response's :attr:`HttpResponse.charset` (defaulting to ``UTF-8`` if empty).
|
||||
|
||||
@ -1130,20 +1126,12 @@ types of HTTP responses. Like ``HttpResponse``, these subclasses live in
|
||||
This read-only attribute represents the URL the response will redirect
|
||||
to (equivalent to the ``Location`` response header).
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The ``preserve_request`` argument was added.
|
||||
|
||||
.. class:: HttpResponsePermanentRedirect
|
||||
|
||||
Like :class:`HttpResponseRedirect`, but it returns a permanent redirect
|
||||
(HTTP status code 301) instead of a "found" redirect (status code 302).
|
||||
When ``preserve_request=True``, the response's status code is 308.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The ``preserve_request`` argument was added.
|
||||
|
||||
.. class:: HttpResponseNotModified
|
||||
|
||||
The constructor doesn't take any arguments and no content should be added
|
||||
|
@ -90,10 +90,6 @@ For example:
|
||||
>>> reverse("admin:index", fragment="no encoding is done")
|
||||
'/admin/#no encoding is done'
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The ``query`` and ``fragment`` arguments were added.
|
||||
|
||||
.. note::
|
||||
|
||||
The string returned by ``reverse()`` is already
|
||||
@ -147,10 +143,6 @@ URLConf is loaded. Some common cases where this function is necessary are:
|
||||
* providing a reversed URL as a default value for a parameter in a function's
|
||||
signature.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The ``query`` and ``fragment`` arguments were added.
|
||||
|
||||
``resolve()``
|
||||
=============
|
||||
|
||||
|
@ -338,8 +338,6 @@ compatibility
|
||||
``Stylesheet``
|
||||
--------------
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
.. class:: Stylesheet(url, mimetype="", media="screen")
|
||||
|
||||
Represents an RSS stylesheet.
|
||||
@ -383,10 +381,6 @@ compatibility
|
||||
* ``stylesheets`` should be a sequence of either strings or
|
||||
:class:`Stylesheet` instances.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The ``stylesheets`` argument was added.
|
||||
|
||||
.. method:: add_item(title, link, description, author_email=None, author_name=None, author_link=None, pubdate=None, comments=None, unique_id=None, categories=(), item_copyright=None, ttl=None, updateddate=None, enclosures=None, **kwargs)
|
||||
|
||||
Adds an item to the feed. All args are expected to be strings except
|
||||
@ -408,8 +402,6 @@ compatibility
|
||||
|
||||
.. method:: add_stylesheets(self, handler)
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
Add stylesheet information to the document.
|
||||
Called from ``write()``.
|
||||
|
||||
@ -720,10 +712,6 @@ escaping HTML.
|
||||
({"id": b.id, "title": b.title} for b in books),
|
||||
)
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
Support for mappings in ``args_generator`` was added.
|
||||
|
||||
.. function:: json_script(value, element_id=None, encoder=None)
|
||||
|
||||
Escapes all HTML/XML special characters with their Unicode escapes, so
|
||||
|
@ -802,10 +802,6 @@ utility methods:
|
||||
Retrieves a user instance using the contents of the field
|
||||
nominated by ``USERNAME_FIELD``.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
``aget_by_natural_key()`` method was added.
|
||||
|
||||
Extending Django's default ``User``
|
||||
-----------------------------------
|
||||
|
||||
@ -1205,8 +1201,6 @@ using the :setting:`AUTH_USER_MODEL` setting in your ``settings.py``::
|
||||
Adding an async interface
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
To optimize performance when called from an async context authentication,
|
||||
backends can implement async versions of each function - ``aget_user(user_id)``
|
||||
and ``aauthenticate(request, **credentials)``. When an authentication backend
|
||||
|
@ -604,8 +604,6 @@ Django includes four validators:
|
||||
|
||||
.. method:: get_error_message()
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
A hook for customizing the ``ValidationError`` error message. Defaults
|
||||
to ``"This password is too short. It must contain at least <min_length>
|
||||
characters."``.
|
||||
@ -634,8 +632,6 @@ Django includes four validators:
|
||||
|
||||
.. method:: get_error_message()
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
A hook for customizing the ``ValidationError`` error message. Defaults
|
||||
to ``"The password is too similar to the <user_attribute>."``.
|
||||
|
||||
@ -657,8 +653,6 @@ Django includes four validators:
|
||||
|
||||
.. method:: get_error_message()
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
A hook for customizing the ``ValidationError`` error message. Defaults
|
||||
to ``"This password is too common."``.
|
||||
|
||||
@ -673,8 +667,6 @@ Django includes four validators:
|
||||
|
||||
.. method:: get_error_message()
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
A hook for customizing the ``ValidationError`` error message. Defaults
|
||||
to ``"This password is entirely numeric."``.
|
||||
|
||||
|
@ -324,7 +324,3 @@ preference, use :func:`django.http.HttpRequest.get_preferred_type`::
|
||||
"pk": self.object.pk,
|
||||
}
|
||||
return JsonResponse(data)
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The :meth:`.HttpRequest.get_preferred_type` method was added.
|
||||
|
@ -2,8 +2,6 @@
|
||||
Composite primary keys
|
||||
======================
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
In Django, each model has a primary key. By default, this primary key consists
|
||||
of a single field.
|
||||
|
||||
|
@ -350,11 +350,6 @@ email backend API :ref:`provides an alternative
|
||||
:class:`EmailAttachment`, or a tuple with attributes
|
||||
``(filename, content, mimetype)``.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
Support for :class:`EmailAttachment` items of ``attachments`` was
|
||||
added.
|
||||
|
||||
.. versionchanged:: 6.0
|
||||
|
||||
Support for :class:`~email.message.MIMEPart` objects in the
|
||||
@ -515,8 +510,6 @@ email backend API :ref:`provides an alternative
|
||||
|
||||
.. class:: EmailAttachment
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
A named tuple to store attachments to an email.
|
||||
|
||||
The named tuple has the following indexes:
|
||||
@ -555,11 +548,6 @@ Django's email library, you can do this using the
|
||||
Alternatives should only be added using the :meth:`attach_alternative`
|
||||
method, or passed to the constructor.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
In older versions, ``alternatives`` was a list of regular tuples,
|
||||
as opposed to :class:`EmailAlternative` named tuples.
|
||||
|
||||
.. method:: attach_alternative(content, mimetype)
|
||||
|
||||
Attach an alternative representation of the message body in the email.
|
||||
@ -579,8 +567,6 @@ Django's email library, you can do this using the
|
||||
|
||||
.. method:: body_contains(text)
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
Returns a boolean indicating whether the provided ``text`` is
|
||||
contained in the email ``body`` and in all attached MIME type
|
||||
``text/*`` alternatives.
|
||||
@ -599,8 +585,6 @@ Django's email library, you can do this using the
|
||||
|
||||
.. class:: EmailAlternative
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
A named tuple to store alternative versions of email content.
|
||||
|
||||
The named tuple has the following indexes:
|
||||
|
@ -136,8 +136,6 @@ paths to these files.
|
||||
``Script`` objects
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 5.2
|
||||
|
||||
.. class:: Script(src, **attributes)
|
||||
|
||||
Represents a script file.
|
||||
@ -321,10 +319,6 @@ HTML:
|
||||
async>
|
||||
</script>
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The object class ``Script`` was added.
|
||||
|
||||
``Media`` objects
|
||||
=================
|
||||
|
||||
|
@ -125,10 +125,6 @@ This example is equivalent to::
|
||||
``True`` ``True`` 308
|
||||
========= ================ ================
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
The argument ``preserve_request`` was added.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
|
@ -423,11 +423,6 @@ Then add the module containing the serializer definitions to your
|
||||
"json": "django.core.serializers.json",
|
||||
}
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
A ``Deserializer`` class definition was added to each of the provided
|
||||
serialization formats.
|
||||
|
||||
.. _topics-serialization-natural-keys:
|
||||
|
||||
Natural keys
|
||||
|
@ -281,11 +281,6 @@ To prevent serialized data from being loaded twice, setting
|
||||
:data:`~django.db.models.signals.post_migrate` signal when flushing the test
|
||||
database.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
For :class:`TransactionTestCase`, serialized migration data is made
|
||||
available during ``setUpClass()``.
|
||||
|
||||
Other test conditions
|
||||
---------------------
|
||||
|
||||
|
@ -1254,11 +1254,6 @@ By default, fixtures are only loaded into the ``default`` database. If you are
|
||||
using multiple databases and set :attr:`TransactionTestCase.databases`,
|
||||
fixtures will be loaded into all specified databases.
|
||||
|
||||
.. versionchanged:: 5.2
|
||||
|
||||
For :class:`TransactionTestCase`, fixtures were made available during
|
||||
``setUpClass()``.
|
||||
|
||||
URLconf configuration
|
||||
---------------------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user