dumpdata is a Django management command that serializes database data into a fixture. It writes JSON to the screen by default and can restrict output to selected applications. section 4.9
The resulting text preserves object IDs and relationships, so it can represent the state needed to recreate involved tables. Redirect the output to a file when preparing reusable fixture data. section 4.9
Export and inspect band data
Run `python manage.py dumpdata bands | python -m json.tool` to export the bands application and pretty-print its JSON. The output contains serialized musicians and bands, including primary keys and related musician IDs. section 4.9
(venv) RiffMates$ python manage.py dumpdata bands | python -m json.tool
See the command pipeline used to produce human-readable fixture output. section 4.9
Save a fixture with shell redirection, then place it in an app's fixtures directory for loading later. Treat the file as machine-readable text: editor-added byte-order marks or changed newline characters can prevent successful loading. section 4.9
