Merge branch '2.2.x'
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parents 7464e17, 229dcbb · Browse files · 10 files·+15 added−11 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
10 files+15 added−11 removed
- other:+15 added−11 removed
Provenance
- Commit
910179f- Tree
838b6f2- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent 1
7464e17- Parent 2
229dcbb
10 files changed+15 added−11 removed
modified:docs/_static/pycharm-run-config.pngbinary
A binary file, modified.
modified:docs/tutorial/factory.rst+1 added-1 removed
135 unmodified lines136 follow the tutorial.137 138 .. code-block:: text139 140- $ flask --app flaskr --debug run140+ $ flask --app flaskr run --debug141 142 You'll see output similar to this:143 144 .. code-block:: text18 unmodified linesmodified:docs/cli.rst+2 added-2 removed
93 unmodified lines94 the ``--debug`` option.95 96 .. code-block:: console97 98- $ flask --app hello --debug run98+ $ flask --app hello run --debug99 * Serving Flask app "hello"100 * Debug mode: on101 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)102 * Restarting with inotify reloader446 unmodified lines549 550 Click the *Script path* dropdown and change it to *Module name*, then input ``flask``.551 552 The *Parameters* field is set to the CLI command to execute along with any arguments.553-This example uses ``--app hello --debug run``, which will run the development server in553+This example uses ``--app hello run --debug``, which will run the development server in554 debug mode. ``--app hello`` should be the import or file with your Flask app.555 556 If you installed your project as a package in your virtualenv, you may uncheck the557 *PYTHONPATH* options. This will more accurately match how you deploy later.6 unmodified linesmodified:docs/config.rst+3 added-3 removed
45 unmodified lines46 ----------47 48 The :data:`DEBUG` config value is special because it may behave inconsistently if49 changed after the app has begun setting up. In order to set debug mode reliably, use the50-``--debug`` option on the ``flask`` command. ``flask run`` will use the interactive50+``--debug`` option on the ``flask run`` command. ``flask run`` will use the interactive51 debugger and reloader by default in debug mode.52 53 .. code-block:: text54 55- $ flask --app hello --debug run55+ $ flask --app hello run --debug56 57 Using the option is recommended. While it is possible to set :data:`DEBUG` in your58-config or code, this is strongly discouraged. It can't be read early by the ``flask``58+config or code, this is strongly discouraged. It can't be read early by the ``flask run``59 command, and some systems or extensions may have already configured themselves based on60 a previous value.61 62 718 unmodified linesmodified:docs/debugging.rst+2 added-2 removed
41 unmodified lines42 The debugger is enabled by default when the development server is run in debug mode.43 44 .. code-block:: text45 46- $ flask --app hello --debug run46+ $ flask --app hello run --debug47 48 When running from Python code, passing ``debug=True`` enables debug mode, which is49 mostly equivalent.50 20 unmodified lines71 which can interfere.72 73 .. code-block:: text74 75- $ flask --app hello --debug run --no-debugger --no-reload75+ $ flask --app hello run --debug --no-debugger --no-reload76 77 When running from Python:78 79 .. code-block:: python8 unmodified linesmodified:docs/quickstart.rst+1 added-1 removed
106 unmodified lines107 To enable debug mode, use the ``--debug`` option.108 109 .. code-block:: text110 111- $ flask --app hello --debug run111+ $ flask --app hello run --debug112 * Serving Flask app 'hello'113 * Debug mode: on114 * Running on http://127.0.0.1:5000 (Press CTRL+C to quit)115 * Restarting with stat792 unmodified linesmodified:docs/server.rst+1 added-1 removed
22 unmodified lines23 debug mode.24 25 .. code-block:: text26 27- $ flask --app hello --debug run27+ $ flask --app hello run --debug28 29 This enables debug mode, including the interactive debugger and reloader, and then30 starts the server on http://localhost:5000/. Use ``flask run --help`` to see the31 available options, and :doc:`/cli` for detailed instructions about configuring and using84 unmodified linesmodified:examples/tutorial/README.rst+1 added-1 removed
46 unmodified lines47 48 .. code-block:: text49 50 $ flask --app flaskr init-db51- $ flask --app flaskr --debug run51+ $ flask --app flaskr run --debug52 53 Open http://127.0.0.1:5000 in a browser.54 55 13 unmodified linesmodified:src/flask/cli.py+3 added
931 unmodified lines932 exclude_patterns=exclude_patterns,933 )934 935 936+run_command.params.insert(0, _debug_option)937+938+939 @click.command("shell", short_help="Run a shell in the app context.")940 @with_appcontext941 def shell_command() -> None:942 """Run an interactive Python shell in the context of a given112 unmodified linesmodified:CHANGES.rst+1 added
11 unmodified lines12 - Autoescaping is now enabled by default for ``.svg`` files. Inside13 templates this behavior can be changed with the ``autoescape`` tag.14 :issue:`4831`15 - Fix the type of ``template_folder`` to accept ``pathlib.Path``. :issue:`4892`16+- Add ``--debug`` option to the ``flask run`` command. :issue:`4777`17 18 19 Version 2.2.220 -------------1405 unmodified lines