-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.py
More file actions
23 lines (22 loc) · 893 Bytes
/
settings.py
File metadata and controls
23 lines (22 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
from os.path import join, dirname
from dotenv import load_dotenv
try:
dotenv_path = join(dirname(__file__), '.env')
load_dotenv(dotenv_path)
SQL_USER = str(os.environ.get("SQL_USER"))
SQL_PWD = str(os.environ.get("SQL_PWD"))
SQL_HOST = str(os.environ.get("SQL_HOST"))
SQL_PORT = int(os.environ.get("SQL_PORT"))
SQL_DB = str(os.environ.get("SQL_DB"))
SQL_DB = str(os.environ.get("SQL_DB"))
MAIL_USER_ID = str(os.environ.get("MAIL_USER_ID"))
MAIL_USER_PWD = str(os.environ.get("MAIL_USER_PWD"))
except:
SQL_USER = str(os.environ.get("SQL_USER"))
SQL_PWD = str(os.environ.get("SQL_PWD"))
SQL_HOST = str(os.environ.get("SQL_HOST"))
SQL_PORT = int(os.environ.get("SQL_PORT"))
SQL_DB = str(os.environ.get("SQL_DB"))
MAIL_USER_ID = str(os.environ.get("MAIL_USER_ID"))
MAIL_USER_PWD = str(os.environ.get("MAIL_USER_PWD"))