python - Django App - Getting Initial Rows into Database -


i have django application , have few rows want in application @ beginning of time. example system settings table has settings - should setup db instance constructed.

in past, had handled making migration script manually inserted records. however, when run tests , database created , deleted, these scripts not run again , database empty. tests assume migrations have schema migrations, don't need run them again, not case. has led me think maybe migrations shouldn't data migrations , should rethink process? not sure do.

you maybe use fixtures in tests initial data models.

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


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -