Created
September 30, 2019 05:48
-
-
Save moeinserpico/8c19cc9f53404eb71a068e48d4aabb2e to your computer and use it in GitHub Desktop.
.یرایش Seeting جنگو
This file contains 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): | |
'''gets the environment variables''' | |
try: | |
return str(os.environ[name]) | |
except: | |
raise KeyError | |
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