Skip to content

Instantly share code, notes, and snippets.

@jerblack
jerblack / Prevent_flask_production_environment_warning.py
Last active Jul 31, 2020
Disable ability for Flask to display warning about using a development server in a production environment.
View Prevent_flask_production_environment_warning.py
"""
Flask will display a warning everytime you startup your application if you are not using it in behind a separate WSGI server.
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
This was not relevant for my scenario and I wanted the message gone,
so using this method will remove their ability to print that message
You can’t perform that action at this time.