From 08e61ea200d04326f8f40a3130ef613f84cd854d Mon Sep 17 00:00:00 2001 From: Hsiaoming Yang Date: Thu, 22 Mar 2018 23:38:52 +0900 Subject: [PATCH] Add tip for dotenv --- flask/cli.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flask/cli.py b/flask/cli.py index 2a65498e..3e2823c7 100644 --- a/flask/cli.py +++ b/flask/cli.py @@ -585,6 +585,11 @@ def load_dotenv(path=None): """ if dotenv is None: + if path or os.path.exists('.env') or os.path.exists('.flaskenv'): + click.secho( + ' * Tip: There are .env files present.' + ' Do "pip install python-dotenv" to use them', + fg='yellow') return if path is not None: