-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
34 lines (23 loc) · 668 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
"""Flask config class."""
import os
from os.path import join
class Config(object):
"""Set Flask base configuration"""
SECRET_KEY = 'dfdQbTOExternjy5xmCNaA'
# General Config
DEBUG = False
TESTING = False
# Forms config
WTF_CSRF_SECRET_KEY = 'f7Z-JN0ftel5Sp_TywHuxA'
# Database config
CWD = os.getcwd()
SQLALCHEMY_DATABASE_URI = 'sqlite:https:///' + join(CWD, 'cscourses.sqlite')
SQLALCHEMY_TRACK_MODIFICATIONS = False
class ProdConfig(Config):
DEBUG = False
TESTING = False
class TestConfig(Config):
TESTING = True
SQLALCHEMY_DATABASE_URI = 'sqlite:https:///:memory:'
class DevConfig(Config):
DEBUG = True