Add prefix for all commands in documentation (#2877)

* Add prefix for commands in docs

* Add prefix for commands in example's README
This commit is contained in:
Grey Li 2018-09-09 16:41:56 +08:00 committed by Hsiaoming Yang
parent b9b88b0cdf
commit 21b0aa6dd8
19 changed files with 112 additions and 112 deletions

View file

@ -91,14 +91,14 @@ Using Applications
To run such an application, you can use the :command:`flask` command::
export FLASK_APP=myapp
flask run
$ export FLASK_APP=myapp
$ flask run
Flask will automatically detect the factory (``create_app`` or ``make_app``)
in ``myapp``. You can also pass arguments to the factory like this::
export FLASK_APP="myapp:create_app('dev')"
flask run
$ export FLASK_APP="myapp:create_app('dev')"
$ flask run
Then the ``create_app`` factory in ``myapp`` is called with the string
``'dev'`` as the argument. See :doc:`/cli` for more detail.

View file

@ -61,19 +61,19 @@ a big problem, just add a new file called :file:`setup.py` next to the inner
In order to run the application you need to export an environment variable
that tells Flask where to find the application instance::
export FLASK_APP=yourapplication
$ export FLASK_APP=yourapplication
If you are outside of the project directory make sure to provide the exact
path to your application directory. Similarly you can turn on the
development features like this::
export FLASK_ENV=development
$ export FLASK_ENV=development
In order to install and run the application you need to issue the following
commands::
pip install -e .
flask run
$ pip install -e .
$ flask run
What did we gain from this? Now we can restructure the application a bit
into multiple modules. The only thing you have to remember is the