-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
41 lines (31 loc) · 1.02 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from os import getenv
from datetime import timedelta
from dotenv import load_dotenv
load_dotenv()
class Config(object):
SQLALCHEMY_DATABASE_URI = getenv(
'movyrek_DATABASE_URL',
'sqlite:///db.sqlite3?check_same_thread=False'
)
SQLALCHEMY_TRACK_MODIFICATIONS = False
class DebugConfig(Config):
DEBUG = True
SECRET_KEY = getenv('movyrek_SECRET_KEY')
JWT_SECRET_KEY = getenv('JWT_SECRET_KEY')
JWT_ACCESS_TOKEN_EXPIRES = timedelta(days=183) # 6 months
JWT_ERROR_MESSAGE_KEY = "message"
JWT_BLACKLIST_ENABLED = True
JWT_BLACKLIST_TOKEN_CHECKS = ["access", "refresh"]
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 465
MAIL_USE_SSL = True
MAIL_USERNAME = getenv('MAIL_USERNAME')
MAIL_PASSWORD = getenv('MAIL_PASSWORD')
ACTIVATION_EMAIL_SALT = getenv('ACTIVATION_EMAIL_SALT')
CLOUD_NAME = getenv('CLOUD_NAME')
API_KEY = getenv('API_KEY')
API_SECRET = getenv('API_SECRET')
TMDB_KEY = getenv('TMDB_KEY')
app_config_dict = {
'Debug': DebugConfig,
}