[Django]fixturesを使う
- November 17th, 2009
- Posted in Python
- Write comment
忘れないようにメモ。
以下のコマンドで、DBに入っている値をFixturesとして出力。
python manage.py dumpdata --settings=settings_hoge --format=json --indent=4 --exclude=auth --exclude=contenttypes > fixtures.json
以下のコマンドで、DBに値をロード。
python manage.py loaddata --settings=settings_hoge fixtures.json
Popularity: 5% [?]
No comments yet.