Created
December 11, 2013 13:56
-
-
Save JuniorLima/7910819 to your computer and use it in GitHub Desktop.
Providing initial data for models
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Dump de todos os models do projeto | |
python manage.py dumpdata --indent=4 > site.json | |
python manage.py dumpdata --indent=4 > initial_data.json | |
#Dump de todos os models de uma app | |
python manage.py dumpdata app --indent=4 > app.json | |
#Dump de apenas um model de uma app | |
python manage.py dumpdata app.model --indent=4 > model.json | |
python manage.py loaddata site.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment