Tuesday, April 17, 2012

Django Initial data dumping and loading

"manage.py dumpdata" for dumping data to json file.

$./ manage.py dumpdata app.myModel1 app.myModel2 <relative_path_to_app>/fixtures/initial_data.json
   --indent 4

"manage.py loaddata" for loading data from json file.

$ ./manage.py  loaddata <relative_path_to_app>/fixtures/initial_data.json

1 comment:

  1. Hi, probably our entry may be off topic but anyways, I have been surfing around your blog and it looks very professional. It’s obvious you know your topic and you appear fervent about it. I’m developing a fresh blog plus I’m struggling to make it look good, as well as offer the best quality content. I have learned much at your web site and also I anticipate alot more articles and will be coming back soon. Thanks you.




    Document Management Systems

    ReplyDelete