开发者

django newbie - creating fixtures data from manually entered data

I have finally got my admin part of my django site working.

I am now beginning the tedious part of manually entering the initial data into the database. Obviously, I want this to be a one time affair.

Can anyone sugge开发者_开发知识库st to me how I can create fixtures data from my manually entered data, so that I can reload the data (automatically?) when I do a manage.py syncdb ?


Use the dumpdata management command.

python manage.py dumpdata yourappname > app_data.json
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜