Hello,

I have been scouring all over to figure out what is wrong with my
configuration, and it's probably something simple I have overlooked.
I'm developing a Django application that will run on Apache/mod_wsgi.
In my settings.py file, I set the DATABASES variable and the DEBUG
variable depending on if the website is running from the development
machine.

The code works as expected on the Django development server; DEBUG
gets FALSE.  However, it doesn't work as expected on the Apache/
mod_wsgi server; DEBUG gets TRUE.  What am I doing wrong?  Am I even
at the right group to ask this question?

Thank you very much!

This is what I have:

import socket
if socket.gethostname()=='IT':
    DEBUG = True
    DATABASES = {
        'default': {
                'NAME': 'dev_database',
                'ENGINE': 'sqlserver_ado',
                'HOST': 'server\\SQLSERVER',
                'USER': '',
                'PASSWORD': '',
                'OPTIONS': {
                    'provider': 'SQLOLEDB',
                    'use_mars': True,
                },
        }
    }
else:
    DEBUG = False
    DATABASES = {
        'default': {
                'NAME': 'live_database',
                'ENGINE': 'sqlserver_ado',
                'HOST': 'server\\SQLSERVER',
                'USER': '',
                'PASSWORD': '',
                'OPTIONS': {
                    'provider': 'SQLOLEDB',
                    'use_mars': True,
                },
        }
    }

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en.

Reply via email to