django-admin dumpdata [app_label...]

Output the contents of the database as a fixture of the given format (using each model's default manager unless --all is specified)

Arguments

NameDescription
app_labelRestricts dumped data to the specified app_label or app_label.ModelName

Options

NameDescription
--format <FORMAT>Specifies the output serialization format for fixtures
--indent <INDENT>Specifies the indent level to use when pretty-printing output
--database <DATABASE>Nominates a specific database to dump fixtures from. Defaults to the "default" database
-e, --exclude <EXCLUDE>An app_label or app_label.ModelName to exclude (use multiple --exclude to exclude multiple apps/models)
--natural-foreignUse natural foreign keys if they are available
--natural-primaryUse natural primary keys if they are available
-a, --allUse Django's base manager to dump all models stored in the database, including those that would otherwise be filtered or modified by a custom manager
--pks <PRIMARY_KEYS>Only dump objects with given primary keys. Accepts a comma-separated list of keys. This option only works when you specify one model
-o, --output <OUTPUT>Specifies file to which the output is written
--skip-checksSkip system checks
-h, --helpShow this help message and exit
--versionShow program's version number and exit
-v, --verbosity <{0,1,2,3}>Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output
--settings <SETTINGS>The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used
--pythonpath <PYTHONPATH>A directory to add to the Python path, e.g. "/home/djangoprojects/myproject"
--tracebackRaise on CommandError exceptions
--no-colorDon't colorize the command output
--force-colorForce colorization of the command output