Merge pull request #4742 from pallets/env-default
fix default value of app.env
This commit is contained in:
commit
45b2c99c1f
2 changed files with 4 additions and 1 deletions
|
|
@ -3,6 +3,9 @@ Version 2.2.2
|
||||||
|
|
||||||
Unreleased
|
Unreleased
|
||||||
|
|
||||||
|
- Fix the default value for ``app.env`` to be ``"production"``. This
|
||||||
|
attribute remains deprecated. :issue:`4740`
|
||||||
|
|
||||||
|
|
||||||
Version 2.2.1
|
Version 2.2.1
|
||||||
-------------
|
-------------
|
||||||
|
|
|
||||||
|
|
@ -827,7 +827,7 @@ class Flask(Scaffold):
|
||||||
if instance_relative:
|
if instance_relative:
|
||||||
root_path = self.instance_path
|
root_path = self.instance_path
|
||||||
defaults = dict(self.default_config)
|
defaults = dict(self.default_config)
|
||||||
defaults["ENV"] = os.environ.get("FLASK_ENV") or "development"
|
defaults["ENV"] = os.environ.get("FLASK_ENV") or "production"
|
||||||
defaults["DEBUG"] = get_debug_flag()
|
defaults["DEBUG"] = get_debug_flag()
|
||||||
return self.config_class(root_path, defaults)
|
return self.config_class(root_path, defaults)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue