forked from Ma233/UIAMS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
executable file
·32 lines (26 loc) · 846 Bytes
/
config.py
File metadata and controls
executable file
·32 lines (26 loc) · 846 Bytes
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
SQLALCHEMY_DATABASE_URI = 'mysql://root:password@localhost/comdb'
CSRF_ENABLED = True
SECRET_KEY = 'you-will-never-guess'
import os
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = 'you-will-never-guess'
FLASK_POSTS_PER_PAGE = 10
UPLOAD_FOLDER = BASE_DIR
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHEMY_DATABASE_URI = 'mysql://root:password@localhost/dev_db'
class TestingConfig(Config):
TESTING = True
SQLALCHEMY_DATABASE_URI = 'mysql://root:password@localhost/comdb'
class ProductionConfig(Config):
SQLALCHEMY_DATABASE_URI = 'mysql://root:password@localhost/comdb'
config = {
'development':DevelopmentConfig,
'testing':TestingConfig,
'production':ProductionConfig,
'default':DevelopmentConfig
}