views:

41

answers:

2

Hi all,

It there a tool for django to install some static data (necessary data to have application runing ) to database?

./manage.py syncdb will make the database schema i db, some tool for pushing static data to db ?

Thanks

+3  A: 

Fixtures.

EDIT: Better example.

Baresi
+1  A: 

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.

del-boy