... under ASGI . Async views will still work under WSGI, but with a small per-request adaptation cost (see パフォーマンス ), and without the abil ... ity to have efficient long-running requests. Many parts of Django provide asynchronous APIs, including the ORM , the cache framework, authentication, sessions, and signals. For other code, the sync_to_a ... sync() adapter is a low-cost bridge (see パフォーマンス ). A wide range of async-native Python libraries can also be integrated. 非同期ビュー ¶ どのようなビューでも、呼び出し可能オブジェクトでコルーチンを ... ... under ASGI . Async views will still work under WSGI, but with a small per-request adaptation cost (see パフォーマンス ), and without the abil ... ity to have efficient long-running requests. Many parts of Django provide asynchronous APIs, including the ORM , the cache framework, authentication, sessions, and signals. For other code, the sync_to_a ... sync() adapter is a low-cost bridge (see パフォーマンス ). A wide range of async-native Python libraries can also be integrated. 非同期ビュー ¶ どのようなビューでも、呼び出し可能オブジェクトでコルーチンを ... ... ding to the backend, InvalidTask is raised. See enqueueing Tasks for usage examples. aenqueue ( * args , ** kwargs ) ¶ The async variant of enqueue . get_result ( result_id ) [ソース] ¶ Retrieves a result by its id. If the result does not exist, TaskR ... ed. If the backend does not support get_result() , NotImplementedError is raised. aget_result ( * args , ** kwargs ) ¶ The async variant of get_result . Task context ¶ class TaskContext [ソース] ¶ Contains context for the running Task . Context only p ... n values for usage examples. refresh () [ソース] ¶ Refresh the result's attributes from the queue store. arefresh () ¶ The async variant of TaskResult.refresh() . is_finished [ソース] ¶ Whether the Task has finished (successfully or not). attempts [ソ ... ... ding to the backend, InvalidTask is raised. See enqueueing Tasks for usage examples. aenqueue ( * args , ** kwargs ) ¶ The async variant of enqueue . get_result ( result_id ) [ソース] ¶ Retrieves a result by its id. If the result does not exist, TaskR ... ed. If the backend does not support get_result() , NotImplementedError is raised. aget_result ( * args , ** kwargs ) ¶ The async variant of get_result . Task context ¶ class TaskContext [ソース] ¶ Contains context for the running Task . Context only p ... n values for usage examples. refresh () [ソース] ¶ Refresh the result's attributes from the queue store. arefresh () ¶ The async variant of TaskResult.refresh() . is_finished [ソース] ¶ Whether the Task has finished (successfully or not). attempts [ソ ... ... グ関数は一致する必要があります。ミドルウェアがこの種のイテレータをサポートする必要がある場合には、 StreamingHttpResponse.is_async 確認してください。 例外のハンドリング ¶ Django はビューまたはミドルウェアによって起こされた例外を、エラーステータスコードを ... 属性を設定します。 sync_capable は、ミドルウェアが同期リクエストを処理できるかどうかを表すブール値です。デフォルトは True 。 async_capable は、ミドルウェアが非同期リクエストを処理できるかどうかを表すブール値です。デフォルトは False 。 If your middleware ... has both sync_capable = True and async_capable = True , then Django will pass it the request without converting it. In this case, you can work out if your middle ... ... 引数が追加される可能性があり、レシーバはその新しい引数を扱えなければならないからです。 レシーバーは同じシグネチャーを持ち、 async def を使って宣言された非同期関数になることもできます: async def my_receiver ( sender , ** kwargs ): await asyncio . sleep ... 返されるエラーの __traceback__ 属性に存在します。 asend() は send() と似ていますが、await しなければならないコルーチンです: async def asend_pizza ( self , toppings , size ): await pizza_done . asend ( sender = self . __class__ , toppings = toppings , s ... ize = size ) ... Whether synchronous or asynchronous, receivers will be correctly adapted to whether send() or asend() is used. Synchronous receivers will be called usi ... ... グ関数は一致する必要があります。ミドルウェアがこの種のイテレータをサポートする必要がある場合には、 StreamingHttpResponse.is_async 確認してください。 例外のハンドリング ¶ Django はビューまたはミドルウェアによって起こされた例外を、エラーステータスコードを ... 属性を設定します。 sync_capable は、ミドルウェアが同期リクエストを処理できるかどうかを表すブール値です。デフォルトは True 。 async_capable は、ミドルウェアが非同期リクエストを処理できるかどうかを表すブール値です。デフォルトは False 。 If your middleware ... has both sync_capable = True and async_capable = True , then Django will pass it the request without converting it. In this case, you can work out if your middle ... ... 引数が追加される可能性があり、レシーバはその新しい引数を扱えなければならないからです。 レシーバーは同じシグネチャーを持ち、 async def を使って宣言された非同期関数になることもできます: async def my_receiver ( sender , ** kwargs ): await asyncio . sleep ... 返されるエラーの __traceback__ 属性に存在します。 asend() は send() と似ていますが、await しなければならないコルーチンです: async def asend_pizza ( self , toppings , size ): await pizza_done . asend ( sender = self . __class__ , toppings = toppings , s ... ize = size ) ... Whether synchronous or asynchronous, receivers will be correctly adapted to whether send() or asend() is used. Synchronous receivers will be called usi ... ... 。各バージョン系列の最新リリースのみを公式にサポートし、最新リリースを使用することを 強く推奨 します。 Django 3.1 の新機能 ¶ Asynchronous views and middleware support ¶ Django now supports a fully asynchronous request path, including: Asynchronous views ... Asynchronous middleware Asynchronous tests and test client To get started with async views, you need to declare a view using asy ... nc def : async def my_view ( request ): await asyncio . sleep ( 0.5 ) return HttpResponse ( "Hello, async world!" ) All asynchronous feat ... ... 。各バージョン系列の最新リリースのみを公式にサポートし、最新リリースを使用することを 強く推奨 します。 Django 3.1 の新機能 ¶ Asynchronous views and middleware support ¶ Django now supports a fully asynchronous request path, including: Asynchronous views ... Asynchronous middleware Asynchronous tests and test client To get started with async views, you need to declare a view using asy ... nc def : async def my_view ( request ): await asyncio . sleep ( 0.5 ) return HttpResponse ( "Hello, async world!" ) All asynchronous feat ... 2026年10月08日