well, I am doing some similiar things, for example, I want to show the time when this Django/Apache server start, and set some "gloabl variables" which all of my apps can use, just do like this: I have a primary app named "city", and every other app's views.py will add a line as "from myproject.city.models import * ". So in this models.py, just add codes like: SERVER_START_TIME = datetime.datetime.now() MY_GLOBAL_VAR = (1,2,3) #test def my_init(): for i in range(1,11): print i
my_init() it works fine. And just now I test that the my_init() can be in any of my other appname/models.py. On 9 29 , 9 49 , Mark Green <[EMAIL PROTECTED]> wrote: > hi all, > > i'm looking for a way to perform a bunch of initialization tasks > right after django startup. > > where would i put such things and how/when are they called? > > -mark --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---