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
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
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
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
4 matches
Mail list logo