Hi,

why not get the hostname of the system?

import socket
hostname = socket.gethostname()
if hostname == 'srv01.example.com':
 SERVER='production'
else:
 SERVER='testing'


Kind regards,

Andreas.

On Wed, Aug 19, 2009 at 4:52 PM, Thomas Guettler<[email protected]> wrote:
>
> Hi,
>
> AFAIK there is no such variable in settings.py. It would be nice to have it.
> In your company we use the variable STAGE.
>
> ringemup schrieb:
>> Is there any way to check at runtime whether Django is running on the
>> development server?
>>
>> Thanks!
>
>
> --
> Thomas Guettler, http://www.thomas-guettler.de/
> E-Mail: guettli (*) thomas-guettler + de
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to