-
-
Notifications
You must be signed in to change notification settings - Fork 134
/
config.py
40 lines (28 loc) · 861 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
40
import os
base_path = os.path.dirname(os.path.abspath(__file__))
class Config:
"""Parent configuration class."""
DEBUG = False
SQLALCHEMY_DATABASE_URI = "sqlite:///shopyo.db"
SQLALCHEMY_TRACK_MODIFICATIONS = False
SECRET_KEY = "qow32ijjdkc756osk5dmck" # Need a generator
HOMEPAGE_URL = "/control_panel"
BASE_DIR = base_path
class DevelopmentConfig(Config):
"""Configurations for development"""
ENV = "development"
DEBUG = True
class TestingConfig(Config):
"""Configurations for testsing"""
SQLALCHEMY_DATABASE_URI = "sqlite:///testing.db"
DEBUG = True
LIVESERVER_PORT = 8943
LIVESERVER_TIMEOUT = 10
BCRYPT_LOG_ROUNDS = 4
TESTING = True
WTF_CSRF_ENABLED = False
app_config = {
"development": DevelopmentConfig,
"production": Config,
"testing": TestingConfig,
}