On 19 août, 16:15, Boaz Leskes <[email protected]> wrote:
> Hi,
>
> I have some computationally intensive initialization logic that
> should run when a new process is started up by the web server. Following
> advice on the web, I've imported the module with the initialization
> code from settings.py, which works perfectly as advertised. However,
> it has one side effect which is very cumbersome - the code runs with
> every manage command as well. Every syncdb (and migration as we use
> South) takes forever. This is a problem during deployment.

You may want to check sys.argv[0] (wild guess, but AFAICT this should
do the trick...)

-- 
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?hl=en.

Reply via email to