refactor(重构程序&目录结构)

This commit is contained in:
zhengxinonly
2022-01-23 00:43:39 +08:00
parent 3453b01938
commit 6978002393
60 changed files with 374 additions and 462 deletions
+12
View File
@@ -0,0 +1,12 @@
import os
from dotenv import load_dotenv
root_path = os.path.abspath(os.path.dirname(__file__)).split('applications')[0]
dot_env_path = os.path.join(root_path, '.env')
flask_env_path = os.path.join(root_path, '.flaskenv')
if os.path.exists(dot_env_path):
load_dotenv(dot_env_path)
if os.path.exists(flask_env_path):
load_dotenv(flask_env_path)