On 8/3/06, Alan Green <[EMAIL PROTECTED]> wrote:
You can put code into the management.py file

http://www.bright-green.com/blog/2006_07_12/initialising_application_data_.html

Holy blog on a stick batman - you're right! :-)

The only minor problem I can see with this approach is related to transactions; syncdb commits after initial_data is called on each app, so if you have cross/forward dependencies in the model data you are creating, you might have some difficulty creating your sample data.

However, this is not specific to your technique - it also affects the use of SQL init data. I was going to look at this issue when I was playing with fixtures.

Thanks for the top tip,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to