sudo pip install pyyaml
To save the database in yaml format:
./manage.py dumpdata --format=yaml
or to automatically load the next time the database is synched:
./manage.py dumpdata --format=yaml > fixtures/initial_data.yaml
After all, I prefer the default json format.
./manage.py dumpdata -n --indent=2 > fixtures/initial_data.json
No comments:
Post a Comment