per page, with , order by , clip by
Results of 1 - 10 of about 31 for async (0.004 sec.)
非同期サポート 16209
非同期サポート Django has support for writing asynchronous ("async") views, along with an entirely async-enabled request stack if you are running under ASGI . Async views will still work under WSGI, but with a small per-request adaptation c ... ost (see パフォーマンス ), and without the ability 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. 非同期ビュー どのようなビューでも、呼び出し可能オブジェクトでコルーチンを返 ... すようにすれば、非同期として宣言できます。その際には、一般的に async def を使います。関数ベースのビューの場合、 async def を用いてビュー全体を宣言します。クラスベースのビューの場合、 get() と ...
https://man.mtool.work/django/6.1/topics/async.html
Tasks 9528
Tasks New in Django 6.0. The Task framework provides the contract and plumbing for background work, not the engine that runs it. The Tasks API defines how work is described, queued, and tracked, but leaves actual execution to external infra ... ording 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, TaskRes ... ised. 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 passe ... eturn 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 [ソー ...
https://man.mtool.work/django/6.1/ref/tasks.html
ミドルウェア (Middleware) 9075
ミドルウェア (Middleware) ミドルウェアは、Django のリクエスト/レスポンス処理にフックを加えるためのフレームワークです。これは、Django の入力あるいは出力をグローバルに置き換えるための、軽量で低レベルの「プラグイン」システムです。 各ミドルウェ ... グ関数は一致する必要があります。ミドルウェアがこの種のイテレータをサポートする必要がある場合には、 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 ...
https://man.mtool.work/django/6.1/topics/http/middleware.html
シグナル 9075
シグナル Django には "シグナルディスパッチャ" があり、フレームワークの他の場所でアクションが発生したときに、ほかのアプリケーションが通知を受けるのを助けてくれます。簡単に言うと、シグナルは特定の 送り手 が、あるアクションが発生したことを一連 ... 引数が追加される可能性があり、レシーバはその新しい引数を扱えなければならないからです。 レシーバーは同じシグネチャーを持ち、 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 ...
https://man.mtool.work/django/6.1/topics/signals.html
Django 3.1 リリースノート 8719
Django 3.1 リリースノート August 4, 2020 Django 3.1 へようこそ! このリリースノートでは、 バージョン 3.1 の新機能 と、Django 3.0 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... )。各バージョン系列の最新リリースのみを公式にサポートし、最新リリースを使用することを 強く推奨 します。 Django 3.1 の新機能 Asynchronous views and middleware support Django now supports a fully asynchronous request path, including: Asynchronous views A ... synchronous middleware Asynchronous tests and test client To get started with async views, you need to declare a view using async def : async def my_vi ... ew ( request ): await asyncio . sleep ( 0.5 ) return HttpResponse ( "Hello, async world!" ) All asynchronous features are supported whether you are ru ...
https://man.mtool.work/django/6.1/releases/3.1.html
クラスベースビュー 8541
クラスベースビュー ビューとは、リクエストを受け取り、レスポンスを返す呼び出し可能オブジェクトです。ビューは単なる関数以上のものにもなり得ます。Django ではビューとして使用できるいくつかのクラスを提供しており、これらを利用することで、ビューを ... 非同期のクラスベース・ビュー 既に示した同期 ( def ) メソッドハンドラと同様に、 View サブクラスは await : を使用して非同期 ( async def ) メソッドハンドラを定義できます: import asyncio from django.http import HttpResponse from django.views import View cl ... ass AsyncView ( View ): async def get ( self , request , * args , ** kwargs ): # Perform io-blocking view logic using await, sleep f ... or example. await asyncio . sleep ( 1 ) return HttpResponse ( "Hello async world!" ) 1つのビュークラス内では、すべてのユーザー定義メソッドハンドラ ...
https://man.mtool.work/django/6.1/topics/class-based-views/
Django's Tasks framework 8379
Django's Tasks framework New in Django 6.0: For older Django versions, the django-tasks backport is available. For a web application, there's often more than just turning HTTP requests into HTTP responses. For some functionality, it may be ... nd the code in the django/tasks/backends/ directory of the Django source. 非同期サポート Django has developing support for asynchronous Task backends. BaseTaskBackend has async variants of all base methods. By convention, the asynchronous versions of ... a TaskResult , which can be used to retrieve the result of the Task once it has finished executing. To enqueue Tasks in an async context, aenqueue() is available as an async variant of enqueue() . Because both Task arguments and return values are seri ... jango.tasks import default_task_backend result = default_task_backend . get_result ( result_id ) To retrieve results in an async context, aget_result() is available as an async variant of get_result() on both the backend and Task . Some backends, such ...
https://man.mtool.work/django/6.1/topics/tasks.html
Django 3.0.1 リリースノート 8315
Django 3.0.1 リリースノート December 18, 2019 Django 3.0.1 では、セキュリティの問題1件と 3.0 におけるいくつかのバグを修正しました。 CVE-2019-19844: Potential account hijack via password reset form By submitting a suitably crafted email addr ... ixed a regression in Django 3.0 by restoring the ability to use Django inside Jupyter and other environments that force an async context, by adding an option to disable 非同期安全性 mechanism with DJANGO_ALLOW_ASYNC_UNSAFE environment variable ( #3105 ...
https://man.mtool.work/django/6.1/releases/3.0.1.html
テストツール 8315
テストツール Django は、テストを書くのに便利なツールをいくつか提供しています。 There are community-maintained solutions! Django has a vibrant ecosystem. There are testing and fixtures solutions highlighted on the Community Ecosystem page. T ... or inequality assertJSONEqual() JSON fragment equality 編集した設定 でテストを実行する機能。 Access to the synchronous and asynchronous test clients via the client and async_client attributes. データベースクエリを作る手薄との場合、サブクラス Transacti ... ocumentation を参照してください。 テストケースの機能 デフォルトのテストクライアント SimpleTestCase. client SimpleTestCase. async_client Every django.test.*TestCase instance has access to Django's synchronous and asynchronous test clients as self.clien ... t and self.async_client , respectively. Both clients are recreated for each test, so you don't have to worry about state (such as cookies) ...
https://man.mtool.work/django/6.1/topics/testing/tools.html
Django 3.1.1 リリースノート 8024
Django 3.1.1 リリースノート September 1, 2020 Django 3.1.1 fixes two security issues and several bugs in 3.1. CVE-2020-24583: Incorrect permissions on intermediate-level directories on Python 3.7+ On Python 3.7+, FILE_UPLOAD_DIRECTORY_PERMI ... ) ( #31877 ). Enforced thread sensitivity of the MiddlewareMixin.process_request() and process_response() hooks when in an async context ( #31905 ). Fixed __in lookup on key transforms for JSONField with MariaDB, MySQL, Oracle, and SQLite ( #31936 ). ... user didn't have permissions to all intermediate directories in a Django installation path ( #31912 ). Fixed detecting an async get_response callable in various builtin middlewares ( #31928 ). Fixed a QuerySet.order_by() crash on PostgreSQL when orde ...
https://man.mtool.work/django/6.1/releases/3.1.1.html
PREV 1 2 3 4 NEXT