On 2/15/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: > I'd like to perform some one-time actions when the server is started. > They would be similar to the "validating models..." that happens when > the debug server is started. I'd like these things to happen for both > development and real deployed servers. Is there any formal mechanism in > Django for me to hook into the startup logic?
There's the middleware framework (http://www.djangoproject.com/documentation/middleware/), but those hooks are on a per-request basis, not a per-server basis. We could easily add a hook for you, though. The magic-removal branch has a new dispatching framework (we're using PyDispatcher), so if you're willing to wait for that, we can can add the hook there. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org