-
Notifications
You must be signed in to change notification settings - Fork 84
/
config.py
32 lines (26 loc) · 811 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
#-*- coding=utf-8 -*-
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
SQLALCHEMY_TRACK_MODIFICATIONS=True
POSTS_PER_PAGE=15
# MYSQL_DATABASE_HOST = '127.0.0.1'
# MYSQL_DATABASE_PORT = 3306
# MYSQL_DATABASE_USER = 'root'
# MYSQL_DATABASE_PASSWORD = 'root'
# MYSQL_DATABASE_DB = 'sqladvisor'
# MYSQL_DATABASE_CHARSET = 'utf8'
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or 'mysql://root:root@localhost/sqladvisor'
config = {
'development': DevelopmentConfig,
# 'testing': TestingConfig,
# 'production': ProductionConfig,
'default': DevelopmentConfig
}