소스 검색

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'))