-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
32 lines (26 loc) · 842 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
32
import os
class Config:
"""Configuration"""
NAME = "Base"
basedir = os.path.abspath(os.path.dirname(__file__))
DEBUG = False
DEVELOPMENT = False
SECRET_KEY = os.getenv("SECRET_KEY", "this-is-the-default-key")
FLASK_APP = os.getenv("FLASK_APP", "department_app")
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', '').replace(
'postgres://', 'postgresql://') or 'sqlite:///department_db'
DATABASE_CONNECT_OPTIONS = {}
SQLALCHEMY_TRACK_MODIFICATIONS = False
TEMPLATES_AUTO_RELOAD = True
class ProductionConfig(Config):
"""Production config
Use for production deployment
"""
NAME = "Production"
class DevelopmentConfig(Config):
"""Development config
Use for development, DEBUG active
"""
NAME = "Development"
DEBUG = True
DEVELOPMENT = True