Merge branch '2.0.x'

This commit is contained in:
David Lord 2022-02-09 07:37:43 -08:00
commit e37e87140e
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
23 changed files with 221 additions and 180 deletions

View file

@ -27,6 +27,13 @@ environment variable is used to specify how to load the application.
$ export FLASK_APP=hello
$ flask run
.. group-tab:: Fish
.. code-block:: text
$ set -x FLASK_APP hello
$ flask run
.. group-tab:: CMD
.. code-block:: text
@ -156,6 +163,20 @@ reloader.
* Debugger is active!
* Debugger PIN: 223-456-919
.. group-tab:: Fish
.. code-block:: text
$ set -x FLASK_ENV development
$ flask run
* Serving Flask app "hello"
* Environment: development
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with inotify reloader
* Debugger is active!
* Debugger PIN: 223-456-919
.. group-tab:: CMD
.. code-block:: text
@ -207,6 +228,17 @@ separated with ``:``, or ``;`` on Windows.
* Running on http://127.0.0.1:8000/
* Detected change in '/path/to/file1', reloading
.. group-tab:: Fish
.. code-block:: text
$ flask run --extra-files file1:dirA/file2:dirB/
# or
$ set -x FLASK_RUN_EXTRA_FILES file1 dirA/file2 dirB/
$ flask run
* Running on http://127.0.0.1:8000/
* Detected change in '/path/to/file1', reloading
.. group-tab:: CMD
.. code-block:: text
@ -287,6 +319,14 @@ command, instead of ``flask run --port 8000``:
$ flask run
* Running on http://127.0.0.1:8000/
.. group-tab:: Fish
.. code-block:: text
$ set -x FLASK_RUN_PORT 8000
$ flask run
* Running on http://127.0.0.1:8000/
.. group-tab:: CMD
.. code-block:: text
@ -334,6 +374,13 @@ configure as expected.
$ export FLASK_SKIP_DOTENV=1
$ flask run
.. group-tab:: Fish
.. code-block:: text
$ set -x FLASK_SKIP_DOTENV 1
$ flask run
.. group-tab:: CMD
.. code-block:: text
@ -364,6 +411,12 @@ script. Activating the virtualenv will set the variables.
$ export FLASK_APP=hello
.. group-tab:: Fish
Fish, :file:`venv/bin/activate.fish`::
$ set -x FLASK_APP hello
.. group-tab:: CMD
Windows CMD, :file:`venv\\Scripts\\activate.bat`::