how to copy records from one database to another django ?
I tried for the first database
python manage.py dumpdata material - indent = 1
material is the directory database after ?
material.json ?
do I copy this file somewhere? in the second database ?
You can use this command to dump the data to a json file:
python manage.py dumpdata material --indent=1 > my_dir/material.json
And then this command to load it into the database:
python manage.py loaddata my_dir/material.json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With