Skip to content
Myr

document wsgi.py and app.py default modules

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

authored by Miguel Grinberg · committed by Miguel Grinberg · parent 7c40aa9 · Browse files · 1 file+7 added−3 removed
This commit

State

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

Diff stats

1 file+7 added−3 removed

  • other:+7 added−3 removed

1 file+7 added−3 removed

modified:docs/cli.rst+7 added-3 removed
24 unmodified lines
25built-in commands that are always there. Flask extensions can also26register more commands there if they desire so.2728For the :command:`flask` script to work, an application needs to be29discovered. This is achieved by exporting the ``FLASK_APP`` environment30variable. It can be either set to an import path or to a filename of a31Python module that contains a Flask application.29discovered. Flask looks for a module named wsgi.py or app.py by default, and30if it finds one it assumes the application is defined in it.3132You can instruct Flask to look for the application in a different module by33exporting the ``FLASK_APP`` environment variable. It can be either set to an34import path or to a filename of a Python module that contains a Flask35application.3637In that imported file the name of the app needs to be called ``app`` or38optionally be specified after a colon. For instance39``mymodule:application`` would tell it to use the `application` object in40the :file:`mymodule.py` file.
267 unmodified lines