浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

python - Django In-Memory SQLite3 Database - Stack Overflow

You will want to use fixtures:

https://docs.djangoproject.com/en/1.3/howto/initial-data/

share|edit|flag
 upvote
 flag
Thanks for the link. I'm unfortunately not quite sure how to use them, though -- how would they be able to create a password for Django itself? – Mehrdad Jul 6 '11 at 16:56
 upvote
 flag
Once you have a running copy with the user you want simply export a fixture from the users model. ./manage.py dumpdata auth.User > initial_data.json. This fixture will be loaded every time you run syncdb docs.djangoproject.com/en/1.3/howto/initial-data/… – John Jul 6 '11 at 17:22
posted on 2012-12-16 08:03  lexus  阅读(301)  评论(0编辑  收藏  举报