For a reference how to create an initial data preloader, you could use the following code of Django e-commerce package called Satchmo: http://satchmo.python-hosting.com/file/trunk/satchmo/load_data.py
Good luck! Aidas Bendoraitis [aka Archatas] On 8/3/06, Gennan Chen <[EMAIL PROTECTED]> wrote: > > Thanks! Joe and Russ. I plan to do it this way. I am pretty new to django. > So, i really don't want to mess it too much, such as create my own manger > etc... > > > Gen > > > On Aug 2, 2006, at 4:45 PM, Joseph Heck wrote: > You might just consider using the model objects, or even the default > manipulators, to create your base objects. That's exactly what we did, and > have both "initial_data.py" and "example_data.py" as a part of our build & > testing process. At the start, we just have the model imports and away we > go. > > It's not build in to the framework, but it's not hard to use either. > > -joe > > On 8/2/06, Gennan Chen < [EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Thanks for help. I did feel this hook is kind of strange since the whole > idea of using model/DB API is to avoid writing SQL script. > > > > > > Since initial info I need to put in is some system info (such as host > name, ip address...), which are not fixed, I intend to write another py file > to do that instead of generating SQL dynamically. However, can I override > class's __init__ function? Or I need to create a customized Manager for > that?? > > > > > > > > > > Gen > > > > > > > > > > On Aug 2, 2006, at 3:38 PM, Malcolm Tredinnick wrote: > > > > > > > > > > On Wed, 2006-08-02 at 14:52 -0700, Gennan Chen wrote: > > > > Hi! > > > > > > > > > > is there any way to put some initial data in the db by using "syncdb" > > option? Or I need to cook my own?? > > > > > > > http://www.djangoproject.com/documentation/model_api/#providing-initial-sql-data > > > > > > Regards, > > Malcolm > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

