-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
50 lines (36 loc) · 1.03 KB
/
Copy pathconfig.py
File metadata and controls
50 lines (36 loc) · 1.03 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
import os
class Config(object):
"""
Common configurations
"""
# Put any configurations here that are common across all environments
TESTING = False
SQLALCHEMY_DATABASE_URI = os.environ.get('SQLALCHEMY_DATABASE_URI')
SQLALCHEMY_TRACK_MODIFICATIONS = False
SECRET_KEY = os.environ.get('SECRET_KEY') or 'IHateThisFluPandemic'
class DevelopmentConfig(Config):
"""
Development configurations
"""
FLASK_DEBUG = True
SQLALCHEMY_ECHO = True
class ProductionConfig(Config):
"""
Production configurations
"""
FLASK_DEBUG = False
SQLALCHEMY_ECHO = False
class TestConfig(Config):
"""
Testing configurations
"""
TESTING = True
FLASK_DEBUG = True
SQLALCHEMY_ECHO = False
SQLALCHEMY_DATABASE_URI = os.environ.get('SQLALCHEMY_DATABASE_URI_TEST')
PRESERVE_CONTEXT_ON_EXCEPTION = False
app_config = {
'development': DevelopmentConfig,
'production': ProductionConfig,
'test': TestConfig
}