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.com")
if DEVELOPMENT_MODE: # local dev:
DEBUG = True
else: # on the server:
DEBUG = False
On Wed, May 14, 2008 at 7:41 AM, Bob <[EMAIL PROTECTED]> wrote:
>
> 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 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),
>>
>> > > request.META['GATEWAY_INTERFACE'] = 'CGI/1.1'
>>
>> > > or
>>
>> > > request.META['SERVER_SOFTWARE'] = 'mod_python''
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---