forked from orbit-oss/flask
Add --debug option to flask run
This commit is contained in:
parent
79032ca5f1
commit
4bc0e4943d
2 changed files with 9 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ Unreleased
|
||||||
templates this behavior can be changed with the ``autoescape`` tag.
|
templates this behavior can be changed with the ``autoescape`` tag.
|
||||||
:issue:`4831`
|
:issue:`4831`
|
||||||
- Fix the type of ``template_folder`` to accept ``pathlib.Path``. :issue:`4892`
|
- Fix the type of ``template_folder`` to accept ``pathlib.Path``. :issue:`4892`
|
||||||
|
- Add ``--debug`` option to the ``flask run`` command. :issue:`4777`
|
||||||
|
|
||||||
|
|
||||||
Version 2.2.2
|
Version 2.2.2
|
||||||
|
|
|
||||||
|
|
@ -837,6 +837,11 @@ class SeparatedPathType(click.Path):
|
||||||
expose_value=False,
|
expose_value=False,
|
||||||
help="The key file to use when specifying a certificate.",
|
help="The key file to use when specifying a certificate.",
|
||||||
)
|
)
|
||||||
|
@click.option(
|
||||||
|
"--debug/--no-debug",
|
||||||
|
default=None,
|
||||||
|
help="Enable or disable the debug mode.",
|
||||||
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
"--reload/--no-reload",
|
"--reload/--no-reload",
|
||||||
default=None,
|
default=None,
|
||||||
|
|
@ -878,6 +883,7 @@ def run_command(
|
||||||
info,
|
info,
|
||||||
host,
|
host,
|
||||||
port,
|
port,
|
||||||
|
debug,
|
||||||
reload,
|
reload,
|
||||||
debugger,
|
debugger,
|
||||||
with_threads,
|
with_threads,
|
||||||
|
|
@ -910,7 +916,8 @@ def run_command(
|
||||||
# command fails.
|
# command fails.
|
||||||
raise e from None
|
raise e from None
|
||||||
|
|
||||||
debug = get_debug_flag()
|
if debug is None:
|
||||||
|
debug = get_debug_flag()
|
||||||
|
|
||||||
if reload is None:
|
if reload is None:
|
||||||
reload = debug
|
reload = debug
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue