-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
39 lines (26 loc) · 948 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
39
"""Flask config class."""
from os.path import dirname, abspath, join
class Config(object):
"""Set Flask base configuration"""
SECRET_KEY = 'a_random_key' # Please create your own secret key
# General Config
DEBUG = False
TESTING = False
# Forms config
WTF_CSRF_SECRET_KEY = 'this-is-not-random-but-it-should-be' # Please create your own secret key
# Database config
CWD = dirname(abspath(__file__))
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + join(CWD, 'iep_minors.sqlite')
SQLALCHEMY_TRACK_MODIFICATIONS = False
DATABASE = join(CWD, 'iep_minors.sqlite')
class ProdConfig(Config):
DEBUG = False
TESTING = False
class TestConfig(Config):
TESTING = True
# In memory database
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
# To allow forms to be submitted from the tests without the CSRF token
WTF_CSRF_ENABLED = False
class DevConfig(Config):
DEBUG = True