Removed versionadded/changed annotations for 4.0.
This commit is contained in:
parent
d10e569ea5
commit
ca1c3151c3
|
@ -239,8 +239,6 @@ All attributes can be set in your derived class and can be used in
|
|||
|
||||
.. attribute:: BaseCommand.suppressed_base_arguments
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The default command options to suppress in the help output. This should be
|
||||
a set of option names (e.g. ``'--verbosity'``). The default values for the
|
||||
suppressed options are still passed.
|
||||
|
|
|
@ -127,10 +127,6 @@ Python style
|
|||
"""
|
||||
...
|
||||
|
||||
.. versionchanged:: 4.0.3
|
||||
|
||||
All Python code in Django was reformatted with `black`_.
|
||||
|
||||
.. _coding-style-imports:
|
||||
|
||||
Imports
|
||||
|
|
|
@ -94,10 +94,6 @@ Django's system checks are organized using the following tags:
|
|||
|
||||
Some checks may be registered with multiple tags.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``files`` tag was added.
|
||||
|
||||
Core system checks
|
||||
==================
|
||||
|
||||
|
@ -157,8 +153,6 @@ If you're using MySQL or MariaDB, the following checks will be performed:
|
|||
Managing files
|
||||
--------------
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The following checks verify your setup for :doc:`/topics/files`:
|
||||
|
||||
* **files.E001**: The :setting:`FILE_UPLOAD_TEMP_DIR` setting refers to the
|
||||
|
|
|
@ -285,8 +285,6 @@ editing content:
|
|||
|
||||
.. attribute:: form_class
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Inherited from :class:`~django.views.generic.edit.BaseDeleteView`. The
|
||||
form class that will be used to confirm the request. By default
|
||||
:class:`django.forms.Form`, resulting in an empty form that is always
|
||||
|
@ -336,8 +334,3 @@ editing content:
|
|||
* :class:`django.views.generic.edit.DeletionMixin`
|
||||
* :class:`django.views.generic.edit.FormMixin`
|
||||
* :class:`django.views.generic.detail.BaseDetailView`
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
In older versions, ``BaseDeleteView`` does not inherit from
|
||||
``FormMixin``.
|
||||
|
|
|
@ -55,10 +55,6 @@ system along with all the fields, properties, and methods available on it.
|
|||
Relationships to other models appear as hyperlinks. Descriptions are pulled
|
||||
from ``help_text`` attributes on fields or from docstrings on model methods.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Older versions don't display model cached properties.
|
||||
|
||||
A model with useful documentation might look like this::
|
||||
|
||||
class BlogEntry(models.Model):
|
||||
|
|
|
@ -1203,8 +1203,6 @@ subclass::
|
|||
|
||||
.. attribute:: ModelAdmin.search_help_text
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Set ``search_help_text`` to specify a descriptive text for the search box
|
||||
which will be displayed below it.
|
||||
|
||||
|
@ -1938,8 +1936,6 @@ templates used by the :class:`ModelAdmin` views:
|
|||
|
||||
.. method:: ModelAdmin.get_formset_kwargs(request, obj, inline, prefix)
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
A hook for customizing the keyword arguments passed to the constructor of a
|
||||
formset. For example, to pass ``request`` to formset forms::
|
||||
|
||||
|
@ -2091,10 +2087,6 @@ forms or widgets depending on ``django.jQuery`` must specify
|
|||
``js=['admin/js/jquery.init.js', …]`` when :ref:`declaring form media assets
|
||||
<assets-as-a-static-definition>`.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
jQuery was upgraded from 3.5.1 to 3.6.0.
|
||||
|
||||
The :class:`ModelAdmin` class requires jQuery by default, so there is no need
|
||||
to add jQuery to your ``ModelAdmin``’s list of media resources unless you have
|
||||
a specific need. For example, if you require the jQuery library to be in the
|
||||
|
@ -2310,10 +2302,6 @@ The ``InlineModelAdmin`` class adds or customizes:
|
|||
:attr:`.InlineModelAdmin.verbose_name` is defined, Django will use
|
||||
:attr:`.InlineModelAdmin.verbose_name` + ``'s'``.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The fallback to :attr:`.InlineModelAdmin.verbose_name` was added.
|
||||
|
||||
.. attribute:: InlineModelAdmin.can_delete
|
||||
|
||||
Specifies whether or not inline objects can be deleted in the inline.
|
||||
|
@ -2895,10 +2883,6 @@ Templates can override or extend base admin templates as described in
|
|||
* ``admin_url``: admin changelist URL for the model
|
||||
* ``add_url``: admin URL to add a new model instance
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``model`` variable for each model was added.
|
||||
|
||||
.. method:: AdminSite.get_app_list(request, app_label=None)
|
||||
|
||||
Returns a list of applications from the :doc:`application registry
|
||||
|
|
|
@ -8,8 +8,6 @@ GeoDjango's admin site
|
|||
``GISModelAdmin``
|
||||
=================
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
.. class:: GISModelAdmin
|
||||
|
||||
.. attribute:: gis_widget
|
||||
|
|
|
@ -1160,10 +1160,6 @@ blue.
|
|||
>>> rst.name # Stored in a random path in the vsimem filesystem.
|
||||
'/vsimem/da300bdb-129d-49a8-b336-e410a9428dad'
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Creating rasters in any GDAL virtual filesystem was allowed.
|
||||
|
||||
.. attribute:: name
|
||||
|
||||
The name of the source which is equivalent to the input file path or the name
|
||||
|
@ -1822,8 +1818,6 @@ Here's how to create a raster and return it as a file in an
|
|||
Using other Virtual Filesystems
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Depending on the local build of GDAL other virtual filesystems may be
|
||||
supported. You can use them by prepending the provided path with the
|
||||
appropriate ``/vsi*/`` prefix. See the `GDAL Virtual Filesystems
|
||||
|
|
|
@ -13,8 +13,6 @@ These expressions are available from the
|
|||
|
||||
.. class:: ArraySubquery(queryset)
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
``ArraySubquery`` is a :class:`~django.db.models.Subquery` that uses the
|
||||
PostgreSQL ``ARRAY`` constructor to build a list of values from the queryset,
|
||||
which must use :meth:`.QuerySet.values` to return only a single column.
|
||||
|
|
|
@ -178,10 +178,6 @@ available from the ``django.contrib.postgres.indexes`` module.
|
|||
|
||||
creates an exclusion constraint on ``circle`` using ``circle_ops``.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Support for functional unique constraints was added.
|
||||
|
||||
.. versionchanged:: 4.1
|
||||
|
||||
Support for exclusion constraints was added.
|
||||
|
|
|
@ -27,8 +27,6 @@ The ``trigram_similar`` lookup can be used on
|
|||
|
||||
.. fieldlookup:: trigram_word_similar
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The ``trigram_word_similar`` lookup allows you to perform trigram word
|
||||
similarity lookups using a dedicated PostgreSQL extension. It can be
|
||||
approximately understood as measuring the greatest number of trigrams shared
|
||||
|
|
|
@ -186,8 +186,6 @@ database.
|
|||
Adding constraints without enforcing validation
|
||||
===============================================
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
PostgreSQL supports the ``NOT VALID`` option with the ``ADD CONSTRAINT``
|
||||
statement to add check constraints without enforcing validation on existing
|
||||
rows. This option is useful if you want to skip the potentially lengthy scan of
|
||||
|
|
|
@ -318,8 +318,6 @@ Usage example::
|
|||
``TrigramWordSimilarity``
|
||||
-------------------------
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
.. class:: TrigramWordSimilarity(string, expression, **extra)
|
||||
|
||||
Accepts a string or expression, and a field name or expression. Returns the
|
||||
|
@ -358,8 +356,6 @@ Usage example::
|
|||
``TrigramWordDistance``
|
||||
-----------------------
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
.. class:: TrigramWordDistance(string, expression, **extra)
|
||||
|
||||
Accepts a string or expression, and a field name or expression. Returns the
|
||||
|
|
|
@ -325,12 +325,6 @@ argument. For example::
|
|||
manifest_storage = StaticFilesStorage(location=settings.BASE_DIR)
|
||||
super().__init__(*args, manifest_storage=manifest_storage, **kwargs)
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Support for finding paths in JavaScript source map comments was added.
|
||||
|
||||
The ``manifest_storage`` argument was added.
|
||||
|
||||
.. versionchanged:: 4.1
|
||||
|
||||
Support for finding paths in CSS source map comments was added.
|
||||
|
@ -397,10 +391,6 @@ hashing algorithm.
|
|||
Use this mixin with a custom storage to append the MD5 hash of the file's
|
||||
content to the filename as :class:`~storage.ManifestStaticFilesStorage` does.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``manifest_storage`` argument was added.
|
||||
|
||||
Finders Module
|
||||
==============
|
||||
|
||||
|
|
|
@ -82,10 +82,6 @@ The CSRF protection is based on the following things:
|
|||
Expanding the accepted referers beyond the current host or cookie domain can
|
||||
be done with the :setting:`CSRF_TRUSTED_ORIGINS` setting.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
``Origin`` checking was added, as described above.
|
||||
|
||||
.. versionchanged:: 4.1
|
||||
|
||||
In older versions, the CSRF cookie value was masked.
|
||||
|
|
|
@ -160,11 +160,6 @@ password from the `password file`_, you must specify them in the
|
|||
.. _connection service file: https://www.postgresql.org/docs/current/libpq-pgservice.html
|
||||
.. _password file: https://www.postgresql.org/docs/current/libpq-pgpass.html
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Support for connecting by a service name, and specifying a password file
|
||||
was added.
|
||||
|
||||
.. warning::
|
||||
|
||||
Using a service name for testing purposes is not supported. This
|
||||
|
|
|
@ -1027,10 +1027,6 @@ multithreaded by default.
|
|||
Uses IPv6 for the development server. This changes the default IP address from
|
||||
``127.0.0.1`` to ``::1``.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Support for the ``--skip-checks`` option was added.
|
||||
|
||||
Examples of using different ports and addresses
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -1326,8 +1322,6 @@ empty list.
|
|||
|
||||
.. django-admin-option:: --exclude DIRECTORIES, -x DIRECTORIES
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Specifies which directories in the app template should be excluded, in addition
|
||||
to ``.git`` and ``__pycache__``. If this option is not provided, directories
|
||||
named ``__pycache__`` or starting with ``.`` will be excluded.
|
||||
|
@ -1403,8 +1397,6 @@ empty list.
|
|||
|
||||
.. django-admin-option:: --exclude DIRECTORIES, -x DIRECTORIES
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Specifies which directories in the project template should be excluded, in
|
||||
addition to ``.git`` and ``__pycache__``. If this option is not provided,
|
||||
directories named ``__pycache__`` or starting with ``.`` will be excluded.
|
||||
|
@ -1463,8 +1455,6 @@ before running the test suite.
|
|||
|
||||
.. django-admin-option:: --shuffle [SEED]
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Randomizes the order of tests before running them. This can help detect tests
|
||||
that aren't properly isolated. The test order generated by this option is a
|
||||
deterministic function of the integer seed given. When no seed is passed, a
|
||||
|
@ -1548,10 +1538,6 @@ don't.
|
|||
in order to exchange them between processes. See
|
||||
:ref:`python:pickle-picklable` for details.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Support for the value ``auto`` was added.
|
||||
|
||||
.. option:: --tag TAGS
|
||||
|
||||
Runs only tests :ref:`marked with the specified tags <topics-tagging-tests>`.
|
||||
|
@ -1559,10 +1545,6 @@ May be specified multiple times and combined with :option:`test --exclude-tag`.
|
|||
|
||||
Tests that fail to load are always considered matching.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
In older versions, tests that failed to load did not match tags.
|
||||
|
||||
.. option:: --exclude-tag EXCLUDE_TAGS
|
||||
|
||||
Excludes tests :ref:`marked with the specified tags <topics-tagging-tests>`.
|
||||
|
|
|
@ -529,8 +529,6 @@ attributes.
|
|||
``template_name``
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
.. attribute:: Form.template_name
|
||||
|
||||
The name of the template rendered if the form is cast into a string, e.g. via
|
||||
|
@ -549,8 +547,6 @@ class.
|
|||
``render()``
|
||||
~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
.. method:: Form.render(template_name=None, context=None, renderer=None)
|
||||
|
||||
The render method is called by ``__str__`` as well as the
|
||||
|
@ -567,8 +563,6 @@ single call.
|
|||
``get_context()``
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
.. method:: Form.get_context()
|
||||
|
||||
Return the template context for rendering the form.
|
||||
|
@ -583,8 +577,6 @@ The available context is:
|
|||
``template_name_label``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
.. attribute:: Form.template_name_label
|
||||
|
||||
The template used to render a field's ``<label>``, used when calling
|
||||
|
@ -998,16 +990,12 @@ Customizing the error list format
|
|||
|
||||
.. attribute:: renderer
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Specifies the :doc:`renderer <renderers>` to use for ``ErrorList``.
|
||||
Defaults to ``None`` which means to use the default renderer
|
||||
specified by the :setting:`FORM_RENDERER` setting.
|
||||
|
||||
.. attribute:: template_name
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The name of the template used when calling ``__str__`` or
|
||||
:meth:`render`. By default this is
|
||||
``'django/forms/errors/list/default.html'`` which is a proxy for the
|
||||
|
@ -1015,16 +1003,12 @@ Customizing the error list format
|
|||
|
||||
.. attribute:: template_name_text
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The name of the template used when calling :meth:`.as_text`. By default
|
||||
this is ``'django/forms/errors/list/text.html'``. This template renders
|
||||
the errors as a list of bullet points.
|
||||
|
||||
.. attribute:: template_name_ul
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The name of the template used when calling :meth:`.as_ul`. By default
|
||||
this is ``'django/forms/errors/list/ul.html'``. This template renders
|
||||
the errors in ``<li>`` tags with a wrapping ``<ul>`` with the CSS
|
||||
|
@ -1032,8 +1016,6 @@ Customizing the error list format
|
|||
|
||||
.. method:: get_context()
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Return context for rendering of errors in a template.
|
||||
|
||||
The available context is:
|
||||
|
@ -1043,8 +1025,6 @@ Customizing the error list format
|
|||
|
||||
.. method:: render(template_name=None, context=None, renderer=None)
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The render method is called by ``__str__`` as well as by the
|
||||
:meth:`.as_ul` method.
|
||||
|
||||
|
@ -1069,10 +1049,6 @@ Customizing the error list format
|
|||
overriding the default template, see also
|
||||
:ref:`overriding-built-in-form-templates`.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Rendering of :class:`ErrorList` was moved to the template engine.
|
||||
|
||||
.. deprecated:: 4.0
|
||||
|
||||
The ability to return a ``str`` when calling the ``__str__`` method is
|
||||
|
@ -1341,10 +1317,6 @@ Methods of ``BoundField``
|
|||
overriding the default template, see also
|
||||
:ref:`overriding-built-in-form-templates`.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The label is now rendered using the template engine.
|
||||
|
||||
.. versionchanged:: 4.1
|
||||
|
||||
The ``tag`` argument was added.
|
||||
|
|
|
@ -1350,11 +1350,6 @@ generating choices. See :ref:`iterating-relationship-choices` for details.
|
|||
def label_from_instance(self, obj):
|
||||
return "My Object #%i" % obj.id
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Support for containing ``%(value)s`` in the ``invalid_choice`` error
|
||||
message was added.
|
||||
|
||||
``ModelMultipleChoiceField``
|
||||
----------------------------
|
||||
|
||||
|
|
|
@ -16,7 +16,3 @@ Formset API reference. For introductory material about formsets, see the
|
|||
Returns a ``FormSet`` class for the given ``form`` class.
|
||||
|
||||
See :doc:`formsets </topics/forms/formsets>` for example usage.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``renderer`` argument was added.
|
||||
|
|
|
@ -72,10 +72,6 @@ Model Form API reference. For introductory material about model forms, see the
|
|||
|
||||
See :ref:`model-formsets` for example usage.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``renderer`` argument was added.
|
||||
|
||||
.. versionchanged:: 4.1
|
||||
|
||||
The ``edit_only`` argument was added.
|
||||
|
@ -94,10 +90,6 @@ Model Form API reference. For introductory material about model forms, see the
|
|||
|
||||
See :ref:`inline-formsets` for example usage.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``renderer`` argument was added.
|
||||
|
||||
.. versionchanged:: 4.1
|
||||
|
||||
The ``edit_only`` argument was added.
|
||||
|
|
|
@ -182,8 +182,6 @@ needs can be located.
|
|||
Context available in formset templates
|
||||
======================================
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Formset templates receive a context from :meth:`.BaseFormSet.get_context`. By
|
||||
default, formsets receive a dictionary with the following values:
|
||||
|
||||
|
@ -192,8 +190,6 @@ default, formsets receive a dictionary with the following values:
|
|||
Context available in form templates
|
||||
===================================
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Form templates receive a context from :meth:`.Form.get_context`. By default,
|
||||
forms receive a dictionary with the following values:
|
||||
|
||||
|
@ -224,8 +220,6 @@ defines ``widget['subwidgets']`` for looping purposes.
|
|||
Overriding built-in formset templates
|
||||
=====================================
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
:attr:`.BaseFormSet.template_name`
|
||||
|
||||
To override formset templates, you must use the :class:`TemplatesSetting`
|
||||
|
@ -237,8 +231,6 @@ renderer. Then overriding widget templates works :doc:`the same as
|
|||
Overriding built-in form templates
|
||||
==================================
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
:attr:`.Form.template_name`
|
||||
|
||||
To override form templates, you must use the :class:`TemplatesSetting`
|
||||
|
|
|
@ -725,11 +725,6 @@ that specifies the template used to render each choice. For example, for the
|
|||
...
|
||||
</div>
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
So they are announced more concisely by screen readers, radio buttons
|
||||
were changed to render in ``<div>`` tags.
|
||||
|
||||
For more granular control over the generated markup, you can loop over the
|
||||
radio buttons in the template. Assuming a form ``myform`` with a field
|
||||
``beatles`` that uses a ``RadioSelect`` as its widget:
|
||||
|
@ -836,11 +831,6 @@ that specifies the template used to render each choice. For example, for the
|
|||
The outer ``<div>`` container receives the ``id`` attribute of the widget,
|
||||
if defined, or :attr:`BoundField.auto_id` otherwise.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
So they are announced more concisely by screen readers, checkboxes were
|
||||
changed to render in ``<div>`` tags.
|
||||
|
||||
Like :class:`RadioSelect`, you can loop over the individual checkboxes for the
|
||||
widget's choices. Unlike :class:`RadioSelect`, the checkboxes won't include the
|
||||
``required`` HTML attribute if the field is required because browser validation
|
||||
|
|
|
@ -200,10 +200,6 @@ This logging does not include framework-level initialization (e.g.
|
|||
``COMMIT``, and ``ROLLBACK``). Turn on query logging in your database if you
|
||||
wish to view all database queries.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The database ``alias`` was added to log messages.
|
||||
|
||||
.. _django-security-logger:
|
||||
|
||||
``django.security.*``
|
||||
|
|
|
@ -355,8 +355,6 @@ this setting are:
|
|||
Cross-Origin Opener Policy
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Some browsers have the ability to isolate top-level windows from other
|
||||
documents by putting them in a separate browsing context group based on the
|
||||
value of the `Cross-Origin Opener Policy`__ (COOP) header. If a document that
|
||||
|
|
|
@ -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:: 4.0
|
||||
|
||||
Support for lookup expressions was added.
|
||||
|
||||
Some examples::
|
||||
|
||||
>>> from django.db.models import F, Q, When
|
||||
|
|
|
@ -118,8 +118,6 @@ ensures the age field is never less than 18.
|
|||
|
||||
.. attribute:: UniqueConstraint.expressions
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Positional argument ``*expressions`` allows creating functional unique
|
||||
constraints on expressions and database functions.
|
||||
|
||||
|
|
|
@ -1173,10 +1173,6 @@ It can also be registered as a transform. For example::
|
|||
>>> # Get vectors whose round() is less than 20
|
||||
>>> vectors = Vector.objects.filter(x__round__lt=20, y__round__lt=20)
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``precision`` argument was added.
|
||||
|
||||
``Sign``
|
||||
--------
|
||||
|
||||
|
|
|
@ -416,8 +416,6 @@ The ``Aggregate`` API is as follows:
|
|||
|
||||
.. attribute:: empty_result_set_value
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Defaults to ``None`` since most aggregate functions result in ``NULL``
|
||||
when applied to an empty result set.
|
||||
|
||||
|
@ -455,10 +453,6 @@ grouping) contains no entries.
|
|||
The ``**extra`` kwargs are ``key=value`` pairs that can be interpolated
|
||||
into the ``template`` attribute.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``default`` argument was added.
|
||||
|
||||
Creating your own Aggregate Functions
|
||||
-------------------------------------
|
||||
|
||||
|
@ -963,8 +957,6 @@ calling the appropriate methods on the wrapped expression.
|
|||
|
||||
.. attribute:: empty_result_set_value
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Tells Django which value should be returned when the expression is used
|
||||
to apply a function over an empty result set. Defaults to
|
||||
:py:data:`NotImplemented` which forces the expression to be computed on
|
||||
|
|
|
@ -218,8 +218,3 @@ following methods:
|
|||
.. method:: process_rhs(compiler, connection)
|
||||
|
||||
Behaves the same way as :meth:`process_lhs`, for the right-hand side.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Support for using lookups in ``QuerySet`` annotations, aggregations,
|
||||
and directly in filters was added.
|
||||
|
|
|
@ -1869,10 +1869,6 @@ raised if ``select_for_update()`` is used in autocommit mode.
|
|||
PostgreSQL doesn't support ``select_for_update()`` with
|
||||
:class:`~django.db.models.expressions.Window` expressions.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``skip_locked`` argument was allowed on MariaDB 10.6+.
|
||||
|
||||
``raw()``
|
||||
~~~~~~~~~
|
||||
|
||||
|
@ -2331,10 +2327,6 @@ support it).
|
|||
.. _MySQL documentation: https://dev.mysql.com/doc/refman/en/sql-mode.html#ignore-strict-comparison
|
||||
.. _MariaDB documentation: https://mariadb.com/kb/en/ignore/
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Support for the fetching primary key attributes on SQLite 3.35+ was added.
|
||||
|
||||
.. versionchanged:: 4.1
|
||||
|
||||
The ``update_conflicts``, ``update_fields``, and ``unique_fields``
|
||||
|
@ -2364,10 +2356,6 @@ updated::
|
|||
>>> Entry.objects.bulk_update(objs, ['headline'])
|
||||
2
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The return value of the number of objects updated was added.
|
||||
|
||||
:meth:`.QuerySet.update` is used to save the changes, so this is more efficient
|
||||
than iterating through the list of models and calling ``save()`` on each of
|
||||
them, but it has a few caveats:
|
||||
|
@ -2778,8 +2766,6 @@ results and then checks if any were returned.
|
|||
|
||||
*Asynchronous version*: ``acontains()``
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Returns ``True`` if the :class:`.QuerySet` contains ``obj``, and ``False`` if
|
||||
not. This tries to perform the query in the simplest and fastest way possible.
|
||||
|
||||
|
@ -3833,8 +3819,6 @@ example usage.
|
|||
``default``
|
||||
~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
An optional argument that allows specifying a value to use as a default value
|
||||
when the queryset (or grouping) contains no entries.
|
||||
|
||||
|
|
|
@ -159,10 +159,6 @@ You can use a cache backend that doesn't ship with Django by setting
|
|||
:setting:`BACKEND <CACHES-BACKEND>` to a fully-qualified path of a cache
|
||||
backend class (i.e. ``mypackage.backends.whatever.WhateverCache``).
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``RedisCache`` backend was added.
|
||||
|
||||
.. setting:: CACHES-KEY_FUNCTION
|
||||
|
||||
``KEY_FUNCTION``
|
||||
|
@ -494,13 +490,6 @@ The setting also supports subdomains, so you could add
|
|||
``'https://*.example.com'``, for example, to allow access from all subdomains
|
||||
of ``example.com``.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The values in older versions must only include the hostname (possibly with
|
||||
a leading dot) and not the scheme or an asterisk.
|
||||
|
||||
Also, ``Origin`` header checking isn't performed in older versions.
|
||||
|
||||
.. setting:: DATABASES
|
||||
|
||||
``DATABASES``
|
||||
|
@ -2355,8 +2344,6 @@ already have it.
|
|||
``SECURE_CROSS_ORIGIN_OPENER_POLICY``
|
||||
-------------------------------------
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Default: ``'same-origin'``
|
||||
|
||||
Unless set to ``None``, the
|
||||
|
@ -2841,8 +2828,6 @@ the correct environment.
|
|||
``USE_DEPRECATED_PYTZ``
|
||||
-----------------------
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Default: ``False``
|
||||
|
||||
A boolean that specifies whether to use ``pytz``, rather than :mod:`zoneinfo`,
|
||||
|
@ -2885,10 +2870,6 @@ dates using the format of the current locale.
|
|||
|
||||
See also :setting:`LANGUAGE_CODE`, :setting:`USE_I18N` and :setting:`USE_TZ`.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
In older versions, the default value is ``False``.
|
||||
|
||||
.. deprecated:: 4.0
|
||||
|
||||
This setting is deprecated. Starting with Django 5.0, localized formatting
|
||||
|
|
|
@ -437,8 +437,6 @@ Arguments sent with this signal:
|
|||
superuser when ``interactive`` is ``True``.
|
||||
|
||||
``stdout``
|
||||
.. versionadded:: 4.0
|
||||
|
||||
A stream-like object where verbose output should be redirected.
|
||||
|
||||
``using``
|
||||
|
@ -496,8 +494,6 @@ Arguments sent with this signal:
|
|||
superuser when ``interactive`` is ``True``.
|
||||
|
||||
``stdout``
|
||||
.. versionadded:: 4.0
|
||||
|
||||
A stream-like object where verbose output should be redirected.
|
||||
|
||||
``using``
|
||||
|
|
|
@ -1764,13 +1764,6 @@ locale is ``pl`` (Polish):
|
|||
Using ``floatformat`` with no argument is equivalent to using ``floatformat``
|
||||
with an argument of ``-1``.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
``floatformat`` template filter no longer depends on the
|
||||
:setting:`USE_L10N` setting and always returns localized output.
|
||||
|
||||
The ``u`` suffix to force disabling localization was added.
|
||||
|
||||
.. templatefilter:: force_escape
|
||||
|
||||
``force_escape``
|
||||
|
|
|
@ -1006,8 +1006,6 @@ implementation details see :ref:`using-the-views`.
|
|||
|
||||
.. attribute:: next_page
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The URL to redirect to after login. Defaults to
|
||||
:setting:`LOGIN_REDIRECT_URL`.
|
||||
|
||||
|
@ -1055,8 +1053,6 @@ implementation details see :ref:`using-the-views`.
|
|||
|
||||
.. method:: get_default_redirect_url()
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Returns the URL to redirect to after login. The default implementation
|
||||
resolves and returns :attr:`next_page` if set, or
|
||||
:setting:`LOGIN_REDIRECT_URL` otherwise.
|
||||
|
|
|
@ -149,8 +149,6 @@ algorithm.
|
|||
Using ``scrypt`` with Django
|
||||
----------------------------
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
scrypt_ is similar to PBKDF2 and bcrypt in utilizing a set number of iterations
|
||||
to slow down brute-force attacks. However, because PBKDF2 and bcrypt do not
|
||||
require a lot of memory, attackers with sufficient resources can launch
|
||||
|
@ -279,8 +277,6 @@ follows:
|
|||
``scrypt``
|
||||
~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
scrypt_ has the following attributes that can be customized:
|
||||
|
||||
#. ``work_factor`` controls the number of iterations within the hash.
|
||||
|
|
|
@ -163,8 +163,6 @@ particularly temporary.
|
|||
Redis
|
||||
-----
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Redis__ is an in-memory database that can be used for caching. To begin you'll
|
||||
need a Redis server running either locally or on a remote machine.
|
||||
|
||||
|
@ -1074,10 +1072,6 @@ the cache backend.
|
|||
``cache.aadd()`` or ``cache.adelete_many()``. See `Asynchronous support`_
|
||||
for more details.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The async variants of methods were added to the ``BaseCache``.
|
||||
|
||||
.. _cache_key_prefixing:
|
||||
|
||||
Cache key prefixing
|
||||
|
@ -1209,8 +1203,6 @@ instance, to do this for the ``locmem`` backend, put this code in a module::
|
|||
Asynchronous support
|
||||
====================
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Django has developing support for asynchronous cache backends, but does not
|
||||
yet support asynchronous caching. It will be coming in a future release.
|
||||
|
||||
|
|
|
@ -378,10 +378,6 @@ help distinguish them from form-specific errors. For example,
|
|||
<li>Articles in a set must have distinct titles.</li>
|
||||
</ul>
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The additional ``nonform`` class was added.
|
||||
|
||||
Validating the number of forms in a formset
|
||||
===========================================
|
||||
|
||||
|
@ -654,8 +650,6 @@ control the widget used with
|
|||
``deletion_widget``
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
.. attribute:: BaseFormSet.deletion_widget
|
||||
|
||||
Default: :class:`~django.forms.CheckboxInput`
|
||||
|
@ -673,8 +667,6 @@ Set ``deletion_widget`` to specify the widget class to be used with
|
|||
``get_deletion_widget``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
.. method:: BaseFormSet.get_deletion_widget()
|
||||
|
||||
Override ``get_deletion_widget()`` if you need to provide a widget instance for
|
||||
|
@ -791,16 +783,12 @@ Formsets have the following attributes and methods associated with rendering:
|
|||
|
||||
.. attribute:: BaseFormSet.renderer
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Specifies the :doc:`renderer </ref/forms/renderers>` to use for the
|
||||
formset. Defaults to the renderer specified by the :setting:`FORM_RENDERER`
|
||||
setting.
|
||||
|
||||
.. attribute:: BaseFormSet.template_name
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The name of the template rendered if the formset is cast into a string,
|
||||
e.g. via ``print(formset)`` or in a template via ``{{ formset }}``.
|
||||
|
||||
|
@ -830,8 +818,6 @@ Formsets have the following attributes and methods associated with rendering:
|
|||
|
||||
.. attribute:: BaseFormSet.template_name_p
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The name of the template used when calling :meth:`.as_p`. By default this
|
||||
is ``"django/forms/formsets/p.html"``. This template renders the formset's
|
||||
management form and then each form in the formset as per the form's
|
||||
|
@ -839,8 +825,6 @@ Formsets have the following attributes and methods associated with rendering:
|
|||
|
||||
.. attribute:: BaseFormSet.template_name_table
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The name of the template used when calling :meth:`.as_table`. By default
|
||||
this is ``"django/forms/formsets/table.html"``. This template renders the
|
||||
formset's management form and then each form in the formset as per the
|
||||
|
@ -848,8 +832,6 @@ Formsets have the following attributes and methods associated with rendering:
|
|||
|
||||
.. attribute:: BaseFormSet.template_name_ul
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The name of the template used when calling :meth:`.as_ul`. By default this
|
||||
is ``"django/forms/formsets/ul.html"``. This template renders the formset's
|
||||
management form and then each form in the formset as per the form's
|
||||
|
@ -857,8 +839,6 @@ Formsets have the following attributes and methods associated with rendering:
|
|||
|
||||
.. method:: BaseFormSet.get_context()
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
Returns the context for rendering a formset in a template.
|
||||
|
||||
The available context is:
|
||||
|
@ -867,8 +847,6 @@ Formsets have the following attributes and methods associated with rendering:
|
|||
|
||||
.. method:: BaseFormSet.render(template_name=None, context=None, renderer=None)
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The render method is called by ``__str__`` as well as the :meth:`.as_p`,
|
||||
:meth:`.as_ul`, and :meth:`.as_table` methods. All arguments are optional
|
||||
and will default to:
|
||||
|
@ -940,10 +918,6 @@ and ``as_ul`` being available. The rendering of the formset can be customized
|
|||
by specifying the ``template_name`` attribute, or more generally by
|
||||
:ref:`overriding the default template <overriding-built-in-formset-templates>`.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Rendering of formsets was moved to the template engine.
|
||||
|
||||
.. _manually-rendered-can-delete-and-can-order:
|
||||
|
||||
Manually rendered ``can_delete`` and ``can_order``
|
||||
|
|
|
@ -552,10 +552,6 @@ the :meth:`.Form.render`. Here's an example of this being used in a view::
|
|||
|
||||
See :ref:`ref-forms-api-outputting-html` for more details.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
Template rendering of forms was added.
|
||||
|
||||
.. versionchanged:: 4.1
|
||||
|
||||
The ability to set the default ``form_template_name`` on the form renderer
|
||||
|
|
|
@ -35,12 +35,6 @@ Time zone support uses :mod:`zoneinfo`, which is part of the Python standard
|
|||
library from Python 3.9. The ``backports.zoneinfo`` package is automatically
|
||||
installed alongside Django if you are using Python 3.8.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
:mod:`zoneinfo` was made the default timezone implementation. You may
|
||||
continue to use `pytz`_ during the 4.x release cycle via the
|
||||
:setting:`USE_DEPRECATED_PYTZ` setting.
|
||||
|
||||
.. note::
|
||||
|
||||
The default :file:`settings.py` file created by :djadmin:`django-admin
|
||||
|
|
|
@ -216,8 +216,6 @@ security middleware reference <referrer-policy>` for details.
|
|||
Cross-origin opener policy
|
||||
==========================
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The cross-origin opener policy (COOP) header allows browsers to isolate a
|
||||
top-level window from other documents by putting them in a different context
|
||||
group so that they cannot directly interact with the top-level window. If a
|
||||
|
|
|
@ -600,10 +600,6 @@ and tear down the test suite.
|
|||
custom arguments by calling ``parser.add_argument()`` inside the method, so
|
||||
that the :djadmin:`test` command will be able to use those arguments.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
The ``logger`` and ``shuffle`` arguments were added.
|
||||
|
||||
Attributes
|
||||
~~~~~~~~~~
|
||||
|
||||
|
@ -725,8 +721,6 @@ Methods
|
|||
|
||||
.. method:: DiscoverRunner.log(msg, level=None)
|
||||
|
||||
.. versionadded:: 4.0
|
||||
|
||||
If a ``logger`` is set, logs the message at the given integer
|
||||
`logging level`_ (e.g. ``logging.DEBUG``, ``logging.INFO``, or
|
||||
``logging.WARNING``). Otherwise, the message is printed to the console,
|
||||
|
@ -779,10 +773,6 @@ utility methods in the ``django.test.utils`` module.
|
|||
:ref:`serialized_rollback <test-case-serialized-rollback>` feature. If
|
||||
it's not provided, it defaults to ``aliases``.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
The ``serialized_aliases`` kwarg was added.
|
||||
|
||||
.. function:: teardown_databases(old_config, parallel=0, keepdb=False)
|
||||
|
||||
Destroys the test databases, restoring pre-test conditions.
|
||||
|
|
|
@ -239,11 +239,6 @@ You may randomize and/or reverse the execution order inside groups using the
|
|||
:option:`test --shuffle` and :option:`--reverse <test --reverse>` options. This
|
||||
can help with ensuring your tests are independent from each other.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
In older versions, failures detected when loading tests were not ordered
|
||||
first.
|
||||
|
||||
.. _test-case-serialized-rollback:
|
||||
|
||||
Rollback emulation
|
||||
|
|
|
@ -906,11 +906,6 @@ It also provides an additional method:
|
|||
self.assertEqual(mail.outbox[0].subject, 'Contact Form')
|
||||
self.assertEqual(mail.outbox[0].body, 'I like your site')
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
In older versions, new callbacks added while executing
|
||||
:func:`.transaction.on_commit` callbacks were not captured.
|
||||
|
||||
.. _live-test-server:
|
||||
|
||||
``LiveServerTestCase``
|
||||
|
@ -1650,12 +1645,6 @@ your test suite.
|
|||
|
||||
Output in case of error can be customized with the ``msg`` argument.
|
||||
|
||||
.. versionchanged:: 4.0
|
||||
|
||||
In older versions, any attribute (not only boolean attributes) without
|
||||
a value was considered equal to an attribute with the same name and
|
||||
value.
|
||||
|
||||
.. method:: SimpleTestCase.assertHTMLNotEqual(html1, html2, msg=None)
|
||||
|
||||
Asserts that the strings ``html1`` and ``html2`` are *not* equal. The
|
||||
|
|
Loading…
Reference in New Issue