Use the new FLASK_DEBUG environment variable which is standard as of Flask 0.11, in order to control the use of dev or prod config. Need to set this anyway, in order for "flask run" to use reloader and no concurrency.master
							parent
							
								
									d23a3c455b
								
							
						
					
					
						commit
						4c856777f1
					
				| @ -1,10 +1,10 @@ | ||||
| # -*- coding: utf-8 -*- | ||||
| """Create an application instance.""" | ||||
| import os | ||||
| from flask.helpers import get_debug_flag | ||||
| 
 | ||||
| from {{cookiecutter.app_name}}.app import create_app | ||||
| from {{cookiecutter.app_name}}.settings import DevConfig, ProdConfig | ||||
| 
 | ||||
| CONFIG = ProdConfig if os.environ.get('{{cookiecutter.app_name | upper}}_ENV') == 'prod' else DevConfig | ||||
| CONFIG = DevConfig if get_debug_flag() else ProdConfig | ||||
| 
 | ||||
| app = create_app(CONFIG) | ||||
|  | ||||
					Loading…
					
					
				
		Reference in new issue