berinhard / model_mommy

No longer maintained, please migrate to model_bakery
http://model-bakery.readthedocs.org/
Other
903 stars 141 forks source link

Using Model Mommy for loading initial data #116

Closed filipeximenes closed 11 years ago

filipeximenes commented 11 years ago

Hi, I'm using Model Mommy to generate my projects initial data. I'm finding it very useful and it's way better than writing fixtures. Is it a good idea to have a model mommy command to automatically load initial data? Something like what loaddata does with initial_data.json files. Maybe look for files like: mommy_init_data.py.

renatooliveira commented 11 years ago

I think that a management command would be perfect to do this, and maybe do it automatically on 'syncdb' or 'migrate' just like fixtures?

vandersonmota commented 11 years ago

I think this could be done as an extension library, since it is not for testing purposes. I'll reference it in the README