Browse Source

check FLASK_SKIP_DOTENV in app.run

pull/2748/head
David Lord 7 years ago
parent
commit
6e1e3e03ca
No known key found for this signature in database
GPG Key ID: 7A1C87E3F5BC42A8
  1. 10
      flask/app.py

10
flask/app.py

@ -27,9 +27,11 @@ from ._compat import integer_types, reraise, string_types, text_type
from .config import Config, ConfigAttribute from .config import Config, ConfigAttribute
from .ctx import AppContext, RequestContext, _AppCtxGlobals from .ctx import AppContext, RequestContext, _AppCtxGlobals
from .globals import _request_ctx_stack, g, request, session from .globals import _request_ctx_stack, g, request, session
from .helpers import _PackageBoundObject, \ from .helpers import (
_endpoint_from_view_func, find_package, get_env, get_debug_flag, \ _PackageBoundObject,
get_flashed_messages, locked_cached_property, url_for _endpoint_from_view_func, find_package, get_env, get_debug_flag,
get_flashed_messages, locked_cached_property, url_for, get_load_dotenv
)
from .logging import create_logger from .logging import create_logger
from .sessions import SecureCookieSessionInterface from .sessions import SecureCookieSessionInterface
from .signals import appcontext_tearing_down, got_request_exception, \ from .signals import appcontext_tearing_down, got_request_exception, \
@ -904,7 +906,7 @@ class Flask(_PackageBoundObject):
explain_ignored_app_run() explain_ignored_app_run()
return return
if load_dotenv: if get_load_dotenv(load_dotenv):
cli.load_dotenv() cli.load_dotenv()
# if set, let env vars override previous values # if set, let env vars override previous values

Loading…
Cancel
Save