vladimirnani / DjangoCommands

ST2/ST3 plugin for managing django project
29 stars 14 forks source link

Enable environment variables #3

Closed lgaticaq closed 10 years ago

lgaticaq commented 10 years ago

No work environment variables in the settings. Example:

import os

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'drivetech',
        'USER': os.environ.get('POSTGRESQL_USER'),
        'PASSWORD': os.environ.get('POSTGRESQL_PASS'),
        'HOST': '',
        'PORT': '',
    }
}
vladimirnani commented 10 years ago

I think os.environ.copy() should do the job. I will check this later.

mxdevmanuel commented 10 years ago

made a few tests and it seems like there's no problem any more