create fixtures django code example

Example 1: create fixtures django

To dump data:
python manage.py dumpdata app.model_name --indent 4 > fixtures/file_name.json

To load data:
python manage.py loaddata fixtures/model_name.json --app app.model_name

Example 2: create fixtures django

To dump data:
python manage.py dumpdata app.model_name --indent 4 > fixtures/file_name.json

To load data:
python manage.py loaddata fixtures/model_name.json --app app.model_name

Example 3: create fixtures django

python manage.py dumpdata app.model_name --indent 4 > fixtures/file_name.json

Tags: