Browse Source

update config

Zhang Li 2 years ago
parent
commit
4c18f29ac2
1 changed files with 2 additions and 2 deletions
  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'))