Last active
March 5, 2020 08:40
-
-
Save chrysmur/8e6cb377ae6db3b9519761df82369588 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def env_var(name): | |
try: | |
return str(os.environ[name]) | |
except: | |
raise KeyError | |
# Database | |
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases | |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.mysql', | |
'NAME': 'employees', | |
'USER': 'root', | |
'PASSWORD':env_var('DB_PASS'), | |
'HOST':'0.0.0.0', | |
'PORT':'' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment