1
0
mirror of https://github.com/django/django.git synced 2025-06-05 03:29:12 +00:00

[4.1.x] Removed obsolete doc reference to asyncio.iscoroutinefunction.

Backport of 970f61fefb148284fb2af63b5cc844279254111a from main
This commit is contained in:
Nick Pope 2022-10-29 12:34:22 +01:00 committed by Mariusz Felisiak
parent ddf3ee6f9e
commit cc5dc19834

View File

@ -312,7 +312,7 @@ If your middleware has both ``sync_capable = True`` and
``async_capable = True``, then Django will pass it the request without ``async_capable = True``, then Django will pass it the request without
converting it. In this case, you can work out if your middleware will receive converting it. In this case, you can work out if your middleware will receive
async requests by checking if the ``get_response`` object you are passed is a async requests by checking if the ``get_response`` object you are passed is a
coroutine function, using :py:func:`asyncio.iscoroutinefunction`. coroutine function, using ``asyncio.iscoroutinefunction``.
The ``django.utils.decorators`` module contains The ``django.utils.decorators`` module contains
:func:`~django.utils.decorators.sync_only_middleware`, :func:`~django.utils.decorators.sync_only_middleware`,