Skip to content

Commit d78d251

Browse files
committed
deps(flask): use FLASK_DEBUG instead of FLASK_ENV
1 parent ebafd7d commit d78d251

File tree

1 file changed

+3
-3
lines changed
  • docs/docs/05_flask_smorest/02_data_model_improvements

1 file changed

+3
-3
lines changed

docs/docs/05_flask_smorest/02_data_model_improvements/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ Next, let's create the `.flaskenv` file:
108108

109109
```txt title=".flaskenv"
110110
FLASK_APP=app
111-
FLASK_ENV=development
111+
FLASK_DEBUG=True
112112
```
113113

114114
If we have the `python-dotenv` library installed, when we run the `flask run` command, Flask will read the variables inside `.flaskenv` and use them to configure the Flask app.
115115

116-
The configuration that we'll do is to define the Flask app file (here, `app.py`). Then we'll also set the Flask environment to `development`, which does a couple things:
116+
The configuration that we'll do is to define the Flask app file (here, `app.py`). Then we'll also set the `FLASK_DEBUG` flag to `True`, which does a couple things:
117117

118-
- Sets debug mode to true, which makes the app give us better error messages
118+
- Makes the app give us better error messages and return a traceback when we make requests if there's an error.
119119
- Sets the app reloading to true, so the app restarts when we make code changes
120120

121121
We don't want debug mode to be enabled in production (when we deploy our app), but while we're doing development it's definitely a time-saving tool!

0 commit comments

Comments
 (0)