clean up FLASK_ENV docs [ci skip]

This commit is contained in:
David Lord 2018-01-10 15:38:52 -08:00
parent 2949306b7b
commit 87c2e121e0
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
7 changed files with 131 additions and 85 deletions

View file

@ -130,16 +130,14 @@ That is not very nice and Flask can do better. If you enable debug
support the server will reload itself on code changes, and it will also
provide you with a helpful debugger if things go wrong.
To enable all development features (and to disable the debug mode) you can
export the ``FLASK_ENV`` environment variable and set it to
``development``
To enable all development features (including debug mode) you can export
the ``FLASK_ENV`` environment variable and set it to ``development``
before running the server::
$ export FLASK_ENV=development
$ flask run
(On Windows you need to use ``set`` instead of ``export`` and on Flask
versions older than 1.0 you need to export ``FLASK_DEBUG=1`` instead).
(On Windows you need to use ``set`` instead of ``export``.)
This does the following things:
@ -147,6 +145,9 @@ This does the following things:
2. it activates the automatic reloader
3. it enables the debug mode on the Flask application.
You can also control debug mode separately from the environment by
exporting ``FLASK_DEBUG=1``.
There are more parameters that are explained in the :ref:`server` docs.
.. admonition:: Attention