Date Tags Django

DJANGO: dump and load data

If you want to get json from DB for certain model there are 2 usefull commands:
Example is better to show.
To get data from db:

./manage.py dumpdata global_settings.AutoLetter >  ./tools/initial_data/autoletter.json

To load data to db:

./manage.py loaddata ./tools/initial_data/autoletter.json

Comments

comments powered by Disqus