Browse Source

调整settings内的读取文件路径

yf_fyh 3 years ago
parent
commit
52c3ce5a5b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      bigdataAPI/settings.py

+ 2 - 2
bigdataAPI/settings.py

@@ -27,9 +27,9 @@ SECRET_KEY = '$rs)*w)9gh)nkf1=@r$2xguf1b(qz8ba!%hm8lwt54ti3_da^b'
 DEBUG = True
 
 if DEBUG == True:
-    config_path = "test.json"
+    config_path = os.path.join(BASE_DIR,"test.json")
 else:
-    config_path = "formal.json"
+    config_path = os.path.join(BASE_DIR,"formal.json")
 with open(config_path,"r") as f:
     config_data = f.read()
 CONFIG = json.loads(config_data)