To dump all the data in your Django project's db into a nice xml fixture, just run the following command:
Update:python manage.py dumpdata --format=xml APP_NAME > SOME_FIXTURES_FOLDER/APP_NAME/initial_data.xml
As Fabi[1] correctly (and violently jeje :-P) pointed out, json is much cooler:
python manage.py dumpdata --indent=4data.json
[1] @caffeineGalli at Twitter and his site: http://from-the-cloud.com/
No hay comentarios:
Publicar un comentario