django tools for pushing preinstalled data to database
It there a tool for django to install some static data (necessary data to have application runing ) to database?
./manage.py syncdb wi开发者_JAVA技巧ll make the database schema i db, some tool for pushing static data to db ?
Thanks
Fixtures.
EDIT: Better example.
Fill your database with static data you need, then execute command:
./manage.py dumpdata --indent=4 > initial_data.json
After that every ./manage.py syncdb will insert data that you entered the first time into database.
If you are familiar with json format (or xml or yaml) you can edit initial data by hand. For details check out official documentation.
精彩评论