-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.py
More file actions
31 lines (26 loc) · 695 Bytes
/
config.py
File metadata and controls
31 lines (26 loc) · 695 Bytes
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
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
DEBUG = False
TESTING = False
CSRF_ENABLED = True
try:
try:
if os.environ['FLASK_ENV'] == "development":
import settings
SECRET_KEY = settings.SECRET_KEY
except:
SECRET_KEY = os.environ['SECRET_KEY']
except:
import settings
SECRET_KEY = settings.SECRET_KEY
class ProductionConfig(Config):
DEBUG = False
class StagingConfig(Config):
DEVELOPMENT = True
DEBUG = True
class DevelopmentConfig(Config):
DEVELOPMENT = True
DEBUG = True
class TestingConfig(Config):
TESTING = True