-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathconfig.py
37 lines (26 loc) · 870 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
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
# Flask Application Key (optional)
SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
# MySQL Database Settings
MYSQL_DATABASE_HOST = 'localhost'
MYSQL_DATABASE_PORT = 3306
MYSQL_DATABASE_USER = os.environ.get('MYSQL_DATABASE_USER') or None
MYSQL_DATABASE_PASSWORD = os.environ.get('MYSQL_DATABASE_PASSWORD') or None
MYSQL_DATABASE_DB = None
MYSQL_DATABASE_CHARSET = 'utf8'
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
# Add settings for development here.
DEBUG = True
class ProductionConfig(Config):
# Add settings for production here.
DEBUG = False
config = {
'development': DevelopmentConfig,
'production': ProductionConfig,
'default': DevelopmentConfig
}