-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
27 lines (25 loc) · 858 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
class Config:
DB_ENGINE = os.environ.get('DB_ENGINE')
DB_USER = os.environ.get('DB_USER')
DB_PASSWORD = os.environ.get('DB_PASSWORD')
DB_NAME = os.environ.get('DB_NAME')
DB_HOST = os.environ.get('DB_HOST')
DB_PORT = os.environ.get('DB_PORT')
SQLALCHEMY_DATABASE_URI = '{}://{}:{}@{}:{}/{}'.format(
DB_ENGINE,
DB_USER,
DB_PASSWORD,
DB_HOST,
DB_PORT,
DB_NAME
)
SQLALCHEMY_TRACK_MODIFICATIONS = False
ADMIN_FOLDER = os.environ.get('ADMIN_FOLDER')
SECRET_KEY = os.environ.get('SECRET_KEY')
JWT_SECRET_KEY = os.environ.get('JWT_SECRET_KEY')
JWT_BLACKLIST_ENABLED = True
JWT_BLACKLIST_TOKEN_CHECKS = ['access', 'refresh']