-
Notifications
You must be signed in to change notification settings - Fork 30
/
config.py
25 lines (20 loc) · 639 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
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'
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