... に似た出力を表示します。デフォルトの設定はマイナス記号が前に付き、その後にプラス記号が前についた変更された設定が続きます。 dumpdata django-admin dumpdata [app_label[.ModelName] [app_label[.ModelName] ...]] 名前を指定したアプリケーションと関連するデータベ ... にアウトプットします。 アプリケーション名が指定されなかった場合、インストールされたすべてのアプリケーションをダンプします。 dumpdata のアウトプットは loaddata に対するインプットして使用できます。 dumpdata の出力をファイルとして保存すると、 テスト の フィク ... スチャ や、 初期データ として活用できます。 dumpdata は、ダンプするレコードを選択するために、モデルのデフォルトのマネージャを使用することに注意してください。 カスタム マネージ ... ... erver コマンドラインオプション --admins sendtestemail コマンドラインオプション --all diffsettings コマンドラインオプション dumpdata コマンドラインオプション makemessages コマンドラインオプション --app loaddata コマンドラインオプション --backwards sqlmigr ... プション createcachetable コマンドラインオプション createsuperuser コマンドラインオプション dbshell コマンドラインオプション dumpdata コマンドラインオプション flush コマンドラインオプション inspectdb コマンドラインオプション loaddata コマンドラインオプショ ... コマンドラインオプション --empty makemigrations コマンドラインオプション --exclude compilemessages コマンドラインオプション dumpdata コマンドラインオプション loaddata コマンドラインオプション makemessages コマンドラインオプション startapp コマンドラインオ ... ... ベースと非テキストベースのいずれも) 処理可能です。 参考 あるデータをテーブルからシリアライズされた形式として取得したい場合、 dumpdata 管理コマンドが使用できます。 データのシリアライズ 最も高いレベルでは、次のようにデータをシリアライズできます。 from django ... ていないことを保証できず、デシリアライズされたオブジェクトが同じ主キーを保持していることを保証する必要がない場合に便利です。 dumpdata を使用してシリアライズデータを生成する場合は、 dumpdata --natural-foreign と dumpdata --natural-primary コマンドラインフラ ... ィクスチャ内のオブジェクトの順番に注意することで、明示的に前方参照を扱わずに済むことがよくあります。 これを支援するために、 dumpdata --natural-foreign オプションを使用して dumpdata を呼び出すと、標準の主キーオブジェクトをシリアライズする前に、 natural_key ... ... o. 管理コマンド The new --no-color option for django-admin disables the colorization of management command output. The new dumpdata --natural-foreign and dumpdata --natural-primary options, and the new use_natural_foreign_keys and use_natural_primary_key ... ion of Django, you will need to migrate it to take advantage of this feature. For example, you could do the following: Use dumpdata to save your data. Rename the existing database file (keep it as a backup). Run migrate to create the updated schema. Use ... private API, it will go through the normal deprecation. Natural key serialization options The --natural and -n options for dumpdata have been deprecated. Use dumpdata --natural-foreign instead. Similarly, the use_natural_keys argument for serializers.ser ... ... XML serializer does not create documents with a DTD, so this should not cause any issues with the typical round-trip from dumpdata to loaddata , but if you feed your own XML documents to the loaddata management command, you will need to ensure they do n ... ... XML serializer does not create documents with a DTD, so this should not cause any issues with the typical round-trip from dumpdata to loaddata , but if you feed your own XML documents to the loaddata management command, you will need to ensure they do n ... ... 持つ場合に ValueError を発生させます。 Django 5.0 において、ベースのクエリセットが prefetch_related() を使用していた場合に、 dumpdata 管理コマンドのクラッシュを引き起こすリグレションを修正しました ( #35159 )。 Django 5.0 において、Django を ASGI サーバー経 ... ... 法を知っているデータのコレクションです。 すでにいくつかのデータがある場合、フィクスチャを作成する最も簡単な方法は manage.py dumpdata コマンドを使用することです。 もしくは、フィクスチャを手動で書くこともできます; フィクスチャは JSON、XML、または ( PyYAML を ... ... 向上するため、マイグレーション操作ごとに生成される SQL コードの前に、マイグレーション操作の説明を記述するようになりました。 dumpdata コマンドの出力の順番が毎回同じ順番で表示されるようになりました。さらに、 --output オプションを指定すると、端末にプログレス ... d a workaround for a functools.total_ordering() bug in Python versions older than 2.7.3. XML serialization (either through dumpdata or the syndication framework) used to output any characters it received. Now if the content to be serialized contains any ... ible shims introduced to rename the BaseMemcachedCache._get_memcache_timeout() method to get_backend_timeout() is removed. dumpdata の --natural および -n オプションが削除されました。 serializers.serialize() の use_natural_keys 引数が削除されました。 プラ ... ... O 8601 week format. 管理コマンド loaddata now supports fixtures stored in XZ archives ( .xz ) and LZMA archives ( .lzma ). dumpdata now can compress data in the bz2 , gz , lzma , or xz formats. makemigrations can now be called without an active database ... _object() and unsign_object() . シリアライズ (シリアル化) The new JSONL serializer allows using the JSON Lines format with dumpdata and loaddata . This can be useful for populating large databases because data is loaded line by line into memory, rather t ... 2026年10月08日