becivells 5 years ago
parent
commit
b07a77ff2c
1 changed files with 5 additions and 5 deletions
  1. 5 5
      config.py

+ 5 - 5
config.py

@@ -43,14 +43,14 @@ PATH_WHITE_LIST = [
     '/www/wwwroot/.*'
 ]
 
-SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
+SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess@qwea31ws'
 
 
-SQLALCHEMY_DATABASE_SQLITE_URI = "mysql+pymysql://root:password@localhost:3306/webhook?charset=utf8"
-    # os.environ.get('DATABASE_URL') or \
-    #     'sqlite:///' + os.path.join(dbdir, 'app.db')
+SQLALCHEMY_DATABASE_MYSQL_URI = "mysql+pymysql://root:password@localhost:3306/webhook?charset=utf8"
+SQLALCHEMY_DATABASE_SQLITE_URI = os.environ.get('DATABASE_URL') or \
+        'sqlite:///' + os.path.join(dbdir, 'app.db')
 SQLALCHEMY_TRACK_MODIFICATIONS = False
-engine = create_engine(SQLALCHEMY_DATABASE_SQLITE_URI)
+engine = create_engine(SQLALCHEMY_DATABASE_MYSQL_URI)
 session_class = sessionmaker(bind=engine)
 
 #允许在webhooks执行时执行的命令 使用正则表达式进行匹配