我在SELECT column INTO @variable
中有一个最小的申请:
test_app/__init__.py
现在,如果我尝试使用from flask import Flask
app = Flask(__name__)
app.debug = True
运行它,则会得到以下输出:
env FLASK_APP=test_app:app flask run
(请注意第 * Serving Flask app "test_app:app"
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5001/ (Press CTRL+C to quit)
行)
但是,如果我使用创建一个Debug mode: off
文件
test_app/__main__.py
我得到了预期的结果:
from test_app import app
app.run()
我还尝试将其添加到 * Serving Flask app "test_app" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: xxx-xxx-xxx
:
__init__.py
结果是相同的。
为class Config:
DEBUG = True
app.config.from_object(Config)
添加命令行选项--debugger
似乎也无济于事。
我想念什么吗?有没有办法让CLI尊重flask run
的值?
使用Flask 1.0.2,但该问题似乎也出现在0.12中。