-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.py
More file actions
51 lines (38 loc) · 1.05 KB
/
config.py
File metadata and controls
51 lines (38 loc) · 1.05 KB
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
42
43
44
45
46
47
48
49
50
51
import os
class Config:
'''
General configuration parent class
'''
SQLALCHEMY_DATABASE_URI='postgresql+psycopg2://njeri:sophia@localhost/househunting'
SQLALCHEMY_TRACK_MODIFICATIONS = False
SECRET_KEY = 'powerfulsecretkey'
UPLOADED_PHOTOS_DEST ='app/static/photos'
@staticmethod
def init_app(app):
pass
class ProdConfig(Config):
'''
Pruduction configuration child class
Args:
Config: The parent configuration class with General configuration settings
'''
SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL")
class TestConfig(Config):
'''
Testing configuration child class
Args:
Config: The parent configuration class with General configuration settings
'''
pass
class DevConfig(Config):
'''
Development configuration child class
Args:
Config: The parent configuration class with General configuration settings
'''
DEBUG = True
config_options = {
'development': DevConfig,
'production': ProdConfig,
'test': TestConfig
}