开发者

django newbie - creating fixtures data from manually entered data

开发者 https://www.devze.com 2023-01-19 19:39 出处:网络
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

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

精彩评论

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