python - Django In-Memory SQLite3 Database - Stack Overflow

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

你可能感兴趣的:(database)