#系统的配置文件
#项目根目录
import os

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

#基础配置
class BaseConfig:
    DEBUG = False
    SECRET_KEY = ".,X.,KS$%$87W3R09TYYUIUkdsfifiu9"
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    #模板根目录
    TEMPLATE_FOLDER = os.path.join(BASE_DIR,'templates')

    #静态文件目录
    STATIC_FOLDER = os.path.join(BASE_DIR,'static')

#开发配置
class DevelopConfig(BaseConfig):
    DEBUG = True
    SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:123@127.0.0.1:3306/bbs"

#生产环境
class ProductConfig(BaseConfig):
    SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:123@127.0.0.1:3306/bbs"

#测试环境
class TestingConfig(BaseConfig):
    SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:123@127.0.0.1:3306/bbs"


configs = {
    'develop':DevelopConfig,
    'product':ProductConfig,
    'default':BaseConfig,
}