Y.N
Y.N

Reputation: 5257

Django Providing initial data for models with model triggers

I have a Django 1.6.2 application, some of model logics (overrided "save" methods and signal event handlers), and I use the loaddata fixture\data.json command to populate the initial database.

But, problem is - loaddata doesn't triggering the save methods and doesn't sent the signal. It's just dump data's to base...

Can you suggest the fixture- or populate-method for initialaze the base with data + all models logic?

Upvotes: 0

Views: 764

Answers (1)

Y.N
Y.N

Reputation: 5257

I found an example of population script, it covering my needs

http://www.tangowithdjango.com/book/chapters/models.html#creating-a-population-script

Upvotes: 1

Related Questions