-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
38 lines (26 loc) · 969 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
33
34
35
36
37
38
#!/usr/bin/env python3
"""Flask configs for Production, Staging, Development and Testing"""
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
CSRF_ENABLED = True
DEBUG = False
SECRET_KEY = "The Gracehoper was always jigging ajog, hoppy on akkant of his joyicity, (he had a partner pair of findlestilts to supplant him)"
SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(basedir, "data.sqlite")
SQLALCHEMY_TRACK_MODIFICATIONS = False
TESTING = False
class ProductionConfig(Config):
SQLALCHEMY_DATABASE_URI = (
"mysql://kyleuehlein@localhost/thumbs-up-api"
)
DEBUG = False
class StagingConfig(Config):
DEBUG = True
DEVELOPMENT = True
class DevelopmentConfig(Config):
DEBUG = True
DEVELOPMENT = True
class TestConfig(Config):
SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(basedir, "test.data.sqlite")
TESTING = True
WTF_CSRF_ENABLED = False