Skip to content
Myr

Remove `-a/--app` from Quickstart documentation (#2046)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Remove `-a/--app` from Quickstart documentation As mentioned in #2009, simplifying the CLI saw the removal of the `-a/--app` flag. Therefore, the only way to specify the module to import is by setting `FLASK_APP`. * Remove misleading `either` from CLI help The CLI help details how to run the application, but still uses the phrasing "either through the `FLASK_APP`...". This likely is an artifact from when `-a/--app` was still present in the CLI.

authored by Michael Recachinas · committed by Markus Unterwaditzer · parent 7186a5a · Browse files · 2 files+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−5 removed

  • other:+5 added−5 removed

2 files+5 added−5 removed

modified:docs/quickstart.rst+4 added-4 removed
100 unmodified lines
101102Invalid Import Name103```````````````````104105The ``-a`` argument to :command:`flask` is the name of the module to106import. In case that module is incorrectly named you will get an import107error upon start (or if debug is enabled when you navigate to the108application). It will tell you what it tried to import and why it failed.105The ``FLASK_APP`` environment variable is the name of the module to import at 106:command:`flask run`. In case that module is incorrectly named you will get an 107import error upon start (or if debug is enabled when you navigate to the 108application). It will tell you what it tried to import and why it failed.109110The most common reason is a typo or because you did not actually create an111``app`` object.112
781 unmodified lines
modified:flask/cli.py+1 added-1 removed
467 unmodified lines
468469cli = FlaskGroup(help="""\470This shell command acts as general utility script for Flask applications.471472It loads the application configured (either through the FLASK_APP environment472It loads the application configured (through the FLASK_APP environment473variable) and then provides commands either provided by the application or474Flask itself.475476The most useful commands are the "run" and "shell" command.
35 unmodified lines