Re: how to tell if django is running from apache or standalone?

2006-11-16 Thread Graham Dumpleton
sandro.dentella wrote: > Hi all, > > how can I test from within settings.py if I'm running via mod_python > or in standalone way? I need to set a variable, accordingly. You could use something like: in_mod_python = False try: from mod_python import apache in_mod_python = True e

Re: how to tell if django is running from apache or standalone?

2006-11-16 Thread gabor
sandro.dentella wrote: > Hi all, > > how can I test from within settings.py if I'm running via mod_python > or in standalone way? I need to set a variable, accordingly. > what do you mean by "standalone"? using the development server? btw. wouldn't the DEBUG variable help you? simply set i

Re: how to tell if django is running from apache or standalone?

2006-11-16 Thread Christian Joergensen
sandro.dentella wrote: > Hi all, > > how can I test from within settings.py if I'm running via mod_python > or in standalone way? I need to set a variable, accordingly. You could import os and look in os.environ for differences. Maybe somthing differs. -- Christian Joergensen | Linux, progra

how to tell if django is running from apache or standalone?

2006-11-16 Thread sandro.dentella
Hi all, how can I test from within settings.py if I'm running via mod_python or in standalone way? I need to set a variable, accordingly. TIA sandro *:-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django