Untitled
unknown
plain_text
a year ago
676 B
4
Indexable
Never
# -*- coding: utf-8 -*- from .base import * DEBUG = False ALLOWED_HOSTS = ['medtourism.uk', 'www.medtourism.uk'] def get_env_variable(var_name): try: return os.environ[var_name] except KeyError: error_msg = "Set the %s environment variable" % var_name raise ImproperlyConfigured(error_msg) DB_NAME = get_env_variable('DB_NAME') DB_USER = get_env_variable('DB_USER') DB_PASSWORD = get_env_variable('DB_PASSWORD') DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': DB_NAME, 'USER': DB_USER, 'PASSWORD': DB_PASSWORD, 'HOST': 'localhost', 'PORT': '', } }