... tor . connection . alias != "default" : return # Your migration code goes here class Migration ( migrations . Migration ): dependencies = [ # Dependencies to other migrations ] operations = [ migrations . RunPython ( forwards ), ] You can also provide hints ... ons def forwards ( apps , schema_editor ): # Your migration code goes here ... class Migration ( migrations . Migration ): dependencies = [ # Dependencies to other migrations ] operations = [ migrations . RunPython ( forwards , hints = { "target_db" : "defau ... A.B on YYYY-MM-DD HH:MM from django.db import migrations , models import uuid class Migration ( migrations . Migration ): dependencies = [ ( "myapp" , "0005_populate_uuid_values" ), ] operations = [ migrations . AlterField ( model_name = "mymodel" , name = ... ... tor . connection . alias != "default" : return # Your migration code goes here class Migration ( migrations . Migration ): dependencies = [ # Dependencies to other migrations ] operations = [ migrations . RunPython ( forwards ), ] You can also provide hints ... ons def forwards ( apps , schema_editor ): # Your migration code goes here ... class Migration ( migrations . Migration ): dependencies = [ # Dependencies to other migrations ] operations = [ migrations . RunPython ( forwards , hints = { "target_db" : "defau ... A.B on YYYY-MM-DD HH:MM from django.db import migrations , models import uuid class Migration ( migrations . Migration ): dependencies = [ ( "myapp" , "0005_populate_uuid_values" ), ] operations = [ migrations . AlterField ( model_name = "mymodel" , name = ... ... catastrophic loss of data. In order to provide a fix for this problem, it was necessary to introduce a new setting -- TEST_DEPENDENCIES -- that allows you to define any creation order dependencies in your database configuration. Most users -- even users with ... multiple-database configurations -- need not be concerned about the data loss bug, or the manual configuration of TEST_DEPENDENCIES . See the original problem report documentation on controlling the creation order of test databases for details. GeoDjango ... ... catastrophic loss of data. In order to provide a fix for this problem, it was necessary to introduce a new setting -- TEST_DEPENDENCIES -- that allows you to define any creation order dependencies in your database configuration. Most users -- even users with ... multiple-database configurations -- need not be concerned about the data loss bug, or the manual configuration of TEST_DEPENDENCIES . See the original problem report documentation on controlling the creation order of test databases for details. GeoDjango ... ... 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 module that defines the databases to use. To help you get started, Django pr ... k , blacken-docs , flake8 , isort , lint-docs , zizmor , and the documentation spelling checker. In addition to the system dependencies noted elsewhere in this documentation, the command python3 must be on your path and linked to the appropriate version of P ... es -- --settings=my_postgres_settings This command sets up a Python 3.12 virtual environment, installs Django's test suite dependencies (including those for PostgreSQL), and calls runtests.py with the supplied arguments (in this case, --settings=my_postgres_ ... ... 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 module that defines the databases to use. To help you get started, Django pr ... k , blacken-docs , flake8 , isort , lint-docs , zizmor , and the documentation spelling checker. In addition to the system dependencies noted elsewhere in this documentation, the command python3 must be on your path and linked to the appropriate version of P ... es -- --settings=my_postgres_settings This command sets up a Python 3.12 virtual environment, installs Django's test suite dependencies (including those for PostgreSQL), and calls runtests.py with the supplied arguments (in this case, --settings=my_postgres_ ... ... 。しかし、テストセットアップの他のデータベースの作成順は保証されません。 データベース構成が特定の作成順序を必要とする場合、 DEPENDENCIES テスト設定を使用して存在する依存関係を指定できます。次の(単純化した)データベース構成の例を考えてみましょう: DATABASES = ... { "default" : { # ... db settings "TEST" : { "DEPENDENCIES" : [ "diamonds" ], }, }, "diamonds" : { # ... db settings "TEST" : { "DEPENDENCIES" : [], }, }, "clubs" : { # ... db setti ... ngs "TEST" : { "DEPENDENCIES" : [ "diamonds" ], }, }, "spades" : { # ... db settings "TEST" : { "DEPENDENCIES" : [ "diamonds" , "hearts" ], }, }, "hear ... ... 。しかし、テストセットアップの他のデータベースの作成順は保証されません。 データベース構成が特定の作成順序を必要とする場合、 DEPENDENCIES テスト設定を使用して存在する依存関係を指定できます。次の(単純化した)データベース構成の例を考えてみましょう: DATABASES = ... { "default" : { # ... db settings "TEST" : { "DEPENDENCIES" : [ "diamonds" ], }, }, "diamonds" : { # ... db settings "TEST" : { "DEPENDENCIES" : [], }, }, "clubs" : { # ... db setti ... ngs "TEST" : { "DEPENDENCIES" : [ "diamonds" ], }, }, "spades" : { # ... db settings "TEST" : { "DEPENDENCIES" : [ "diamonds" , "hearts" ], }, }, "hear ... ... ated inlines and allowed field references in the admin ( #23754 ). Fixed an infinite loop bug for certain cyclic migration dependencies, and made the error message for cyclic dependencies much more helpful. Added missing index_together handling for SQLite ( ... ... ated inlines and allowed field references in the admin ( #23754 ). Fixed an infinite loop bug for certain cyclic migration dependencies, and made the error message for cyclic dependencies much more helpful. Added missing index_together handling for SQLite ( ... 2026年10月08日