Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationYou can use dark themeWhat you can do with signing up
(python2.7, django1.5) モデルに初期データを投入する — Django 1.4 documentation settings.py 追加 FIXTURE_DIRS = ( os.path.join(ROOT, 'fixtures'), ) フィクスチャ作る fixtures/hoge.json ./manage.py shell とかでデータをいくつか作ってから、ダンプ出力したものを参考にするといいかも。 dumpdata ./manage.py dumpdata --format=json --indent=4 > fixtures/sample.json 読み込む loaddata ./manage.py loaddata fixture/hoge.json syncdb時に初期化して読み込む フィクスチャのファイル名を initial_data.json にすれ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く