... 。 hints New in Django 6.0. The optional hints argument will be passed as **hints to the allow_migrate() method of database routers to assist them in making routing decisions . BloomExtension class BloomExtension ( hints = None ) [ソース] bloom 拡張機能を ... 。 hints New in Django 6.0. The optional hints argument will be passed as **hints to the allow_migrate() method of database routers to assist them in making routing decisions . BtreeGinExtension class BtreeGinExtension ( hints = None ) [ソース] btree_gin ... 。 hints New in Django 6.0. The optional hints argument will be passed as **hints to the allow_migrate() method of database routers to assist them in making routing decisions . BtreeGistExtension class BtreeGistExtension ( hints = None ) [ソース] btree_g ... ... ショナリを空白のままにできます。これを行うには、使用している contrib とサードパーティを含むすべてのアプリのモデルで DATABASE_ROUTERS をセットアップしなければなりません。以下は、 default エントリーを意図的に空のままにして、2つの default ではないデータベース ... ションファイル自体の編集によって起こるものを含む) を検出します。デフォルトでは default データベースのみをチェックしますが、 routers がインストールされている場合には allow_migrate() メソッドを参照します。 自動的なデータベースのルーティング 複数のデータベー ... g behavior. If an instance hint is present, the database from which it was fetched is recorded on its instance._state.db . Routers will need to first consult that attribute before falling back to any fixed alias to match Django's default behavior of fet ... ... ... during the autumn DST change when USE_TZ is False and pytz is installed. Fixed a regression in 1.8.6 that caused database routers without an allow_migrate() method to crash ( #25686 ). Fixed a regression in 1.8.6 by restoring the ability to use Manager ... ... unpack any iterable ( #27058 ). Made makemigrations skip inconsistent history checks on non-default databases if database routers aren't in use or if no apps can be migrated to the database ( #27054 , #27110 , #27142 ). Removed duplicated managers in M ... ... ence of the cleaned_data attribute on the form. Behavior of syncdb with multiple databases syncdb now queries the database routers to determine if content types (when contenttypes is enabled) and permissions (when auth is enabled) should be created in t ... er database was specified with the --database option. If you use syncdb on multiple databases, you should ensure that your routers allow synchronizing content types and permissions to only one of them. See the docs on the behavior of contrib apps with m ... ... se new signals have slightly different arguments. Check the documentation for details. The allow_syncdb method on database routers is now called allow_migrate , but still performs the same function. Routers with allow_syncdb methods will still work, but ... es set-and-expire in the settings as well. The sql* management commands now respect the allow_migrate() method of DATABASE_ROUTERS . If you have models synced to non-default databases, use the --database flag to get SQL for those models (previously they ... ... unSQL operations reversible. The migration operations RunPython and RunSQL now call the allow_migrate() method of database routers. The router can use the newly introduced app_label and hints arguments to make a routing decision. To take advantage of th ... DATAFILE_MAXSIZE and DATAFILE_TMP_MAXSIZE . The override_settings() decorator can now affect the master router in DATABASE_ROUTERS . Added test client support for file uploads with file-like objects. A shared cache is now used when testing with an SQLit ... keLine , and Union ). Signature of the allow_migrate router method The signature of the allow_migrate() method of database routers has changed from allow_migrate(db, model) to allow_migrate(db, app_label, model_name=None, **hints) . When model_name is s ... ... rator() if you don't want caching. The database router allow_relation() method is called in more cases. Improperly written routers may need to be updated accordingly. Translations are no longer deactivated before running management commands. If your cus ... ... tions . RunPython ( forwards ), ] You can also provide hints that will be passed to the allow_migrate() method of database routers as **hints : myapp/dbrouters.py class MyRouter : def allow_migrate ( self , db , app_label , model_name = None , ** hints ... 2026年10月08日