-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
executable file
·39 lines (24 loc) · 1.15 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
import os
from dotenv import load_dotenv
load_dotenv()
#--------------------------------------------------------------------------------------------------#
# flask related
DEBUG = True
#--------------------------------------------------------------------------------------------------#
# postgres related
default = 'postgresql://postgres:root@localhost/web_app'
# db for deployment
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URI', default)
# db for unit test
SQLALCHEMY_TEST_DATABASE_URI = os.getenv('DATABASE_TEST_URI', None)
print(SQLALCHEMY_DATABASE_URI)
if os.environ.get("STAGE", None) == "test":
SQLALCHEMY_DATABASE_URI = SQLALCHEMY_TEST_DATABASE_URI
SQLALCHEMY_TRACK_MODIFICATIONS = True
#--------------------------------------------------------------------------------------------------#
# used for pagination on GET routes
ROWS_PER_PAGE = 10
#--------------------------------------------------------------------------------------------------#
JWT_SECRET_KEY = '25bnDG2yKyvb9HRUSrysFBkbVnFONH8J'
#--------------------------------------------------------------------------------------------------#
BASE_DIR = os.path.dirname(os.path.abspath(__file__))