... that ships with Django for testing applications. See テストを書いて実行する for an explanation of how to write new tests. Running the unit tests Quickstart First, fork Django on GitHub . Second, create and activate a virtual environment. If you're not ... ne in requirements/py3.txt and continue with ./runtests.py . Tests that require pylibmc will be skipped automatically. See Running all the tests for details on installing the optional test dependencies. Running the tests requires a Django settings modul ... ngs module to run the tests with a different database. Having problems? See トラブルシューティング for some common issues. Running tests using tox Tox is a tool for running tests in different virtual environments. Django includes a basic tox.ini that au ... ... enticated and User.is_anonymous properties to be tested for set membership ( #27309 ). Fixed a performance regression when running migrate in projects with RenameModel operations ( #27279 ). Added model_name to the allow_migrate() calls in makemigration ... ... 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, session ... are end-to-end. Where a piece of synchronous middleware sits between an ASGI server and an async view, Django adapts it by running it in its own thread; see パフォーマンス for the cost trade-off. Django's bundled middleware supports both sync and async ... nt requests in a single process share that pool, so size it to the target in-flight query concurrency. パフォーマンス When running in a mode that does not match the view (e.g. an async view under WSGI, or a traditional sync view under ASGI), Django must ... ... ... ncio . sleep ( 0.5 ) return HttpResponse ( "Hello, async world!" ) All asynchronous features are supported whether you are running under WSGI or ASGI mode. However, there will be performance penalties using async code in WSGI mode. You can read more abo ... t execution context. We expect most projects will keep the majority of their views synchronous, and only have a select few running in async mode - but it is entirely your choice. Django's ORM, cache layer, and other pieces of code that do long-running n ... Kyrgyz, Tajik, and Turkmen languages. 管理コマンド The new check --database option allows specifying database aliases for running the database system checks. Previously these checks were enabled for all configured DATABASES by passing the database tag ... ... ... = emails ) By convention, Tasks are defined in a tasks.py file, however this is not enforced. Task context Sometimes, the running Task may need to know context about how it was enqueued, and how it is being executed. This can be accessed by taking a co ... called, it will not update. To refresh the values, call the django.tasks.TaskResult.refresh() method: >>> result . status RUNNING >>> result . refresh () # or await result.arefresh() >>> result . status SUCCESSFUL Return values If your Task function re ... result . return_value 42 If the Task has not finished executing, or has failed, ValueError is raised. >>> result . status RUNNING >>> result . return_value Traceback (most recent call last): ... ValueError : Task has not finished yet Errors If the Task ... ... 4, we have made an exception to this rule. One of the bugs fixed in Django 1.2.4 involves a set of circumstances whereby a running a test suite on a multiple database configuration could cause the original source database (i.e., the actual production da ... rib.gis.tests.GeoDjangoTestSuiteRunner , added in this release. In addition, the GeoDjango test suite is now included when running the Django test suite with runtests.py and using spatial database backends . ... ... eb browser To run the tests from a web browser, open up js_tests/tests.html in your browser. To measure code coverage when running the tests, you need to view that file over HTTP. To view code coverage: ルートディレクトリで python -m http.server を実行し ... e command line, you need to have Node.js installed. After installing Node.js , install the JavaScript test dependencies by running the following from the root of your Django checkout: / $ npm install ...\> npm install Then run the tests with: / ... ... 2026年10月08日