-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample_config.py
39 lines (33 loc) · 999 Bytes
/
sample_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
import os
# from instance import config as instance
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
DEBUG = False
HELLO = True
UPLOAD_FOLDER = os.path.join(basedir,"app/tmp")
MARCEDIT_BINARY_PATH = "/full/path/to/marcedit/binary"
# MARCEDIT_BINARY_PATH = "/Applications/MarcEdit3.app/Contents/MacOS/MarcEdit3"
# ALLOWED_EXTENSIONS = {'json'}
class DevelopmentConfig(Config):
"""
Development configurations
"""
SQLALCHEMY_DATABASE_URI = "sqlite:///{}".format(
os.path.join(basedir,"app.db")
)
DEBUG = True
SQLALCHEMY_ECHO = True
DEBUG_TB_PROFILER_ENABLED = True
SQLALCHEMY_TRACK_MODIFICATIONS = False
class ProductionConfig(Config):
"""
Production configurations
"""
DEBUG = False
SQLALCHEMY_DATABASE_URI = "sqlite:///{}".format(os.path.join(basedir,"app.db"))
SQLALCHEMY_ECHO = False
SQLALCHEMY_TRACK_MODIFICATIONS = False
config_options = {
'development':DevelopmentConfig,
'production':ProductionConfig
}