调整目录结构

This commit is contained in:
zhengxinonly
2021-06-12 21:20:13 +08:00
parent 48633729fb
commit d9a5bcb0de
590 changed files with 1072 additions and 1160 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)