瀏覽代碼

update config

Zhang Li 2 年之前
父節點
當前提交
4c18f29ac2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      configs/settings.py

+ 2 - 2
configs/settings.py

@@ -4,9 +4,9 @@ import os
 
 config = configparser.ConfigParser()
 
-if os.environ.get('APP_ENV') == 'development' or os.environ.get('APP_ENV', '') =='':
+if os.environ.get('APP_ENV', 'development') == 'development':
     config.readfp(open('development.ini'))
-else:
+elif os.environ.get('APP_ENV') == 'production':
     config.readfp(open('production.ini'))
 
 print(config.get('DATABASE', 'host'))