forked from alguadam/ie-bank-be-old
-
Notifications
You must be signed in to change notification settings - Fork 29
/
config.py
31 lines (26 loc) · 875 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
28
29
30
31
from dotenv import load_dotenv
import os
load_dotenv()
class Config(object):
SECRET_KEY = 'this-really-needs-to-be-changed'
SQLALCHEMY_TRACK_MODIFICATIONS = False
class LocalConfig(Config):
SQLALCHEMY_DATABASE_URI = 'sqlite:///local.db'
# SQLALCHEMY_DATABASE_URI = 'postgresql://{dbuser}:{dbpass}@{dbhost}/{dbname}'.format(
# dbuser=os.getenv('DBUSER'),
# dbpass=os.getenv('DBPASS'),
# dbhost=os.getenv('DBHOST'),
# dbname=os.getenv('DBNAME')
# )
# DEBUG = True
class GithubCIConfig(Config):
SQLALCHEMY_DATABASE_URI = 'sqlite:///test.db'
DEBUG = True
class DevelopmentConfig(Config):
SQLALCHEMY_DATABASE_URI = 'postgresql://{dbuser}:{dbpass}@{dbhost}/{dbname}'.format(
dbuser=os.getenv('DBUSER'),
dbpass=os.getenv('DBPASS'),
dbhost=os.getenv('DBHOST'),
dbname=os.getenv('DBNAME')
)
DEBUG = True