mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Removed versionadded/changed annotations for 5.0.
This also removes remaining versionadded/changed annotations for older versions.
This commit is contained in:
@@ -76,8 +76,6 @@ corruption.
|
||||
Decorators
|
||||
----------
|
||||
|
||||
.. versionadded:: 5.0
|
||||
|
||||
The following decorators can be used with both synchronous and asynchronous
|
||||
view functions:
|
||||
|
||||
@@ -181,8 +179,6 @@ mode if you have asynchronous code in your project.
|
||||
Handling disconnects
|
||||
--------------------
|
||||
|
||||
.. versionadded:: 5.0
|
||||
|
||||
For long-lived requests, a client may disconnect before the view returns a
|
||||
response. In this case, an ``asyncio.CancelledError`` will be raised in the
|
||||
view. You can catch this error and handle it if you need to perform any
|
||||
|
||||
@@ -703,10 +703,6 @@ The following attributes and methods are available on any subclass of
|
||||
the user. (This takes care of the password hashing in making the
|
||||
comparison.)
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
``acheck_password()`` method was added.
|
||||
|
||||
.. method:: models.AbstractBaseUser.set_unusable_password()
|
||||
|
||||
Marks the user as having no password set. This isn't the same as
|
||||
|
||||
@@ -155,10 +155,6 @@ Authenticating users
|
||||
this. Rather if you're looking for a way to login a user, use the
|
||||
:class:`~django.contrib.auth.views.LoginView`.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
``aauthenticate()`` function was added.
|
||||
|
||||
.. _topic-authorization:
|
||||
|
||||
Permissions and Authorization
|
||||
@@ -401,10 +397,6 @@ Or in an asynchronous view::
|
||||
# Do something for anonymous users.
|
||||
...
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
The :meth:`.HttpRequest.auser` method was added.
|
||||
|
||||
.. _how-to-log-a-user-in:
|
||||
|
||||
How to log a user in
|
||||
@@ -446,10 +438,6 @@ If you have an authenticated user you want to attach to the current session
|
||||
# Return an 'invalid login' error message.
|
||||
...
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
``alogin()`` function was added.
|
||||
|
||||
Selecting the authentication backend
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -505,10 +493,6 @@ How to log a user out
|
||||
immediately after logging out, do that *after* calling
|
||||
:func:`django.contrib.auth.logout()`.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
``alogout()`` function was added.
|
||||
|
||||
Limiting access to logged-in users
|
||||
----------------------------------
|
||||
|
||||
@@ -1000,10 +984,6 @@ function.
|
||||
else:
|
||||
...
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
``aupdate_session_auth_hash()`` function was added.
|
||||
|
||||
.. note::
|
||||
|
||||
Since
|
||||
|
||||
@@ -493,10 +493,6 @@ from the ``User`` model.
|
||||
to use the default (first entry of ``PASSWORD_HASHERS`` setting). See
|
||||
:ref:`auth-included-hashers` for the algorithm name of each hasher.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
``acheck_password()`` method was added.
|
||||
|
||||
.. function:: make_password(password, salt=None, hasher='default')
|
||||
|
||||
Creates a hashed password in the format used by this application. It takes
|
||||
|
||||
@@ -219,10 +219,6 @@ ones:
|
||||
Further examples are available in the :ref:`model field reference
|
||||
<field-choices>`.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for mappings and callables was added.
|
||||
|
||||
:attr:`~Field.default`
|
||||
The default value for the field. This can be a value or a callable
|
||||
object. If callable it will be called every time a new object is
|
||||
|
||||
@@ -564,8 +564,6 @@ See :ref:`ref-forms-api-outputting-html` for more details.
|
||||
Reusable field group templates
|
||||
------------------------------
|
||||
|
||||
.. versionadded:: 5.0
|
||||
|
||||
Each field is available as an attribute of the form, using
|
||||
``{{ form.name_of_field }}`` in a template. A field has a
|
||||
:meth:`~django.forms.BoundField.as_field_group` method which renders the
|
||||
|
||||
@@ -33,26 +33,14 @@ a :class:`django.http.HttpResponseNotAllowed` if the conditions are not met.
|
||||
|
||||
Note that request methods should be in uppercase.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
.. function:: require_GET()
|
||||
|
||||
Decorator to require that a view only accepts the GET method.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
.. function:: require_POST()
|
||||
|
||||
Decorator to require that a view only accepts the POST method.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
.. function:: require_safe()
|
||||
|
||||
Decorator to require that a view only accepts the GET and HEAD methods.
|
||||
@@ -67,10 +55,6 @@ a :class:`django.http.HttpResponseNotAllowed` if the conditions are not met.
|
||||
such as link checkers, rely on HEAD requests, you might prefer
|
||||
using ``require_safe`` instead of ``require_GET``.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
Conditional view processing
|
||||
===========================
|
||||
|
||||
@@ -87,10 +71,6 @@ control caching behavior on particular views.
|
||||
headers; see
|
||||
:doc:`conditional view processing </topics/conditional-view-processing>`.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
.. module:: django.views.decorators.gzip
|
||||
|
||||
GZip compression
|
||||
@@ -105,10 +85,6 @@ compression on a per-view basis.
|
||||
It sets the ``Vary`` header accordingly, so that caches will base their
|
||||
storage on the ``Accept-Encoding`` header.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
.. module:: django.views.decorators.vary
|
||||
|
||||
Vary headers
|
||||
@@ -119,10 +95,6 @@ caching based on specific request headers.
|
||||
|
||||
.. function:: vary_on_cookie(func)
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
.. function:: vary_on_headers(*headers)
|
||||
|
||||
The ``Vary`` header defines which request headers a cache mechanism should take
|
||||
@@ -130,10 +102,6 @@ caching based on specific request headers.
|
||||
|
||||
See :ref:`using vary headers <using-vary-headers>`.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
.. module:: django.views.decorators.cache
|
||||
|
||||
Caching
|
||||
@@ -149,10 +117,6 @@ client-side caching.
|
||||
:func:`~django.utils.cache.patch_cache_control` for the details of the
|
||||
transformation.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
.. function:: never_cache(view_func)
|
||||
|
||||
This decorator adds an ``Expires`` header to the current date/time.
|
||||
@@ -163,10 +127,6 @@ client-side caching.
|
||||
|
||||
Each header is only added if it isn't already set.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
.. module:: django.views.decorators.common
|
||||
|
||||
Common
|
||||
@@ -180,6 +140,3 @@ customization of :class:`~django.middleware.common.CommonMiddleware` behavior.
|
||||
This decorator allows individual views to be excluded from
|
||||
:setting:`APPEND_SLASH` URL normalization.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for wrapping asynchronous view functions was added.
|
||||
|
||||
@@ -239,10 +239,6 @@ Note: As with ``get()``, a
|
||||
:class:`~django.core.exceptions.MultipleObjectsReturned` exception
|
||||
will be raised if more than one object is found.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
``aget_object_or_404()`` function was added.
|
||||
|
||||
``get_list_or_404()``
|
||||
=====================
|
||||
|
||||
@@ -291,6 +287,3 @@ This example is equivalent to::
|
||||
if not my_objects:
|
||||
raise Http404("No MyModel matches the given query.")
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
``aget_list_or_404()`` function was added.
|
||||
|
||||
@@ -27,10 +27,6 @@ interacting with end users.
|
||||
Time zone support is enabled by default. To disable it, set :setting:`USE_TZ =
|
||||
False <USE_TZ>` in your settings file.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
In older version, time zone support was disabled by default.
|
||||
|
||||
Time zone support uses :mod:`zoneinfo`, which is part of the Python standard
|
||||
library from Python 3.9.
|
||||
|
||||
|
||||
@@ -796,11 +796,6 @@ Django can serialize the following:
|
||||
- Any class reference (must be in module's top-level scope)
|
||||
- Anything with a custom ``deconstruct()`` method (:ref:`see below <custom-deconstruct-method>`)
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Serialization support for functions decorated with :func:`functools.cache`
|
||||
or :func:`functools.lru_cache` was added.
|
||||
|
||||
Django cannot serialize:
|
||||
|
||||
- Nested classes
|
||||
|
||||
@@ -107,10 +107,6 @@ Signals can be sent either synchronously or asynchronously, and receivers will
|
||||
automatically be adapted to the correct call-style. See :ref:`sending signals
|
||||
<sending-signals>` for more information.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for asynchronous receivers was added.
|
||||
|
||||
.. _connecting-receiver-functions:
|
||||
|
||||
Connecting receiver functions
|
||||
@@ -330,10 +326,6 @@ receiver. In addition, async receivers are executed concurrently using
|
||||
All built-in signals, except those in the async request-response cycle, are
|
||||
dispatched using :meth:`Signal.send`.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for asynchronous signals was added.
|
||||
|
||||
Disconnecting signals
|
||||
=====================
|
||||
|
||||
|
||||
@@ -628,10 +628,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:: 5.0
|
||||
|
||||
The ``durations`` argument was added.
|
||||
|
||||
Attributes
|
||||
~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -497,10 +497,6 @@ Use the ``django.test.Client`` class to make requests.
|
||||
:meth:`~django.contrib.auth.models.UserManager.create_user` helper
|
||||
method to create a new user with a correctly hashed password.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
``alogin()`` method was added.
|
||||
|
||||
.. method:: Client.force_login(user, backend=None)
|
||||
.. method:: Client.aforce_login(user, backend=None)
|
||||
|
||||
@@ -528,10 +524,6 @@ Use the ``django.test.Client`` class to make requests.
|
||||
``login()`` by :ref:`using a weaker hasher while testing
|
||||
<speeding-up-tests-auth-hashers>`.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
``aforce_login()`` method was added.
|
||||
|
||||
.. method:: Client.logout()
|
||||
.. method:: Client.alogout()
|
||||
|
||||
@@ -545,10 +537,6 @@ Use the ``django.test.Client`` class to make requests.
|
||||
and session data cleared to defaults. Subsequent requests will appear
|
||||
to come from an :class:`~django.contrib.auth.models.AnonymousUser`.
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
``alogout()`` method was added.
|
||||
|
||||
Testing responses
|
||||
-----------------
|
||||
|
||||
@@ -735,8 +723,6 @@ access these properties as part of a test condition.
|
||||
|
||||
.. method:: Client.asession()
|
||||
|
||||
.. versionadded:: 5.0
|
||||
|
||||
This is similar to the :attr:`session` attribute but it works in async
|
||||
contexts.
|
||||
|
||||
@@ -2062,10 +2048,6 @@ test client, with the following exceptions:
|
||||
>>> c = AsyncClient()
|
||||
>>> c.get("/customers/details/", {"name": "fred", "age": 7}, ACCEPT="application/json")
|
||||
|
||||
.. versionchanged:: 5.0
|
||||
|
||||
Support for the ``follow`` parameter was added to the ``AsyncClient``.
|
||||
|
||||
.. versionchanged:: 5.1
|
||||
|
||||
The ``query_params`` argument was added.
|
||||
|
||||
Reference in New Issue
Block a user