-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.py
46 lines (29 loc) · 1.1 KB
/
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
40
41
42
43
44
45
46
import settings
class Config(object):
# make the warning shut up until Flask-SQLAlchemy v3 comes out
SQLALCHEMY_TRACK_MODIFICATIONS = True
SQLALCHEMY_DATABASE_URI = settings.select_db("Config")
PYLTI_CONFIG = settings.PYLTI_CONFIG
SESSION_COOKIE_NAME = "ft_session"
# Chrome 80 SameSite=None; Secure fix
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_SAMESITE = "None"
class BaseConfig(object):
DEBUG = False
TESTING = False
# make the warning shut up until Flask-SQLAlchemy v3 comes out
SQLALCHEMY_TRACK_MODIFICATIONS = True
SQLALCHEMY_DATABASE_URI = settings.select_db("BaseConfig")
PYLTI_CONFIG = settings.PYLTI_CONFIG
SESSION_COOKIE_NAME = "ft_session"
# Chrome 80 SameSite=None; Secure fix
SESSION_COOKIE_SECURE = True
SESSION_COOKIE_SAMESITE = "None"
class DevelopmentConfig(BaseConfig):
DEBUG = True
TESTING = True
SQLALCHEMY_DATABASE_URI = settings.select_db("DevelopmentConfig")
class TestingConfig(BaseConfig):
DEBUG = False
TESTING = True
SQLALCHEMY_DATABASE_URI = settings.select_db("TestingConfig")