Re: objects in memory that don't time out?

2009-06-26 Thread Robert Mela
Why not just have a global in your view.py? Alternatively, if you need to access the object from multiple views, then implement a singleton in a module, initialize it by importing into settings.py, and then import it into any view that needs it. settings.py works similarly. The values in sett

Re: Logging mechanism in Django

2009-10-12 Thread Robert Mela
If you're running standalone WSGI you could pipe output to Apache's rotatelogs or to cronolog. There may be other generic log rotation subprocesses you can use. They're very reliable. For a straight WSGI server I wrote a logging handler to synchronize logging between threads & processes, wh

Re: How to make django to handle multiple requests at the same time

2010-03-03 Thread Robert Mela
Daniel Roseman wrote: This isn't a question about Django, but about WSGI deployment. Although I must say I'm confused, you say you're using WSGI but you're printing something, so it seems like you're using the development server since that prints to the console? Is this right? If so, you can't d

Re: is there any possibility for two settings.py

2010-03-14 Thread Robert Mela
We load custom environments at startup based on directory from which the app is loaded. The selection could just as easily be based on environment variable, machine name rather than directory path. The simple trick is to have settings.py serve as a proxy for those other, environment-specific