If it's loading data on model's tables, you can use fixtures:

http://docs.djangoproject.com/en/dev/howto/initial-data/

Because it's also possible to define SQL files to run on syncdb, you
can also run SQL-specific tasks (like defining functions, full text
search indexes, etc...).

If the your other setup tasks involve messing with the server, it's
better to factor this out of Django. You can use something like Fabric
for automating deployment tasks instead:

http://docs.fabfile.org/0.9.1/

On 19 ago, 21:55, buddhasystem <potek...@bnl.gov> wrote:
> I need to initialize a few data structures and potentially do other set-up as
> needed, only when the Django server comes up. What's the optimal way of
> doing that?
>
> --
> View this message in 
> context:http://old.nabble.com/What%27s-the-best-practice-for-initializing-the...
> Sent from the django-users mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to