Re: How to determine server?

2008-05-15 Thread Chad Parker
found this in the djangoproject.com source and it works well for me: (goes in settings.py; change webfaction.com to whatever you get from your server) # Far too clever trick to know if we're running on the deployment server. import platform DEVELOPMENT_MODE = (platform.node() != "web22.webfaction

Re: How to determine server?

2008-05-14 Thread Bob
At Django startup, before any requests are handled. On May 13, 7:02 am, "Chatchai Neanudorn" <[EMAIL PROTECTED]> wrote: > Which phase do you want to access? Http request parsing, request > object initializing... > > 2008/5/13, Bob <[EMAIL PROTECTED]>: > > > > > Thanks, Any way to do this without

Re: How to determine server?

2008-05-13 Thread Chatchai Neanudorn
Which phase do you want to access? Http request parsing, request object initializing... 2008/5/13, Bob <[EMAIL PROTECTED]>: > > Thanks, Any way to do this without access to a request object, since I > want to use this information to do some server-specific initialization > before I have a reque

Re: How to determine server?

2008-05-13 Thread Bob
Thanks, Any way to do this without access to a request object, since I want to use this information to do some server-specific initialization before I have a request object to look at? On May 12, 6:56 pm, "Chatchai Neanudorn" <[EMAIL PROTECTED]> wrote: > mod_python (django.core.handlers.modpython

Re: How to determine server?

2008-05-12 Thread Chatchai Neanudorn
mod_python (django.core.handlers.modpython), request.META['GATEWAY_INTERFACE'] = 'CGI/1.1' or request.META['SERVER_SOFTWARE'] = 'mod_python'' or 'ModPythonRequest' in request.__str__() Django, wsgi handler (django.core.handlers.wsgi) 'WSGIRequest' in request.__str__() Hope this help, C

How to determine server?

2008-05-12 Thread Bob
I'd like to find out whether I'm running under the Django development server or mod_python. How can I do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to