Set use_evalex=False
in your app.run
call to disable the console but still have reloading and the pretty Werkzeug "Don't Panic" debugger:
if __name__ == '__main__':
app.run(debug=True, use_evalex=False)
Question
I want my application's dashboard area to be called /console. However, Flask uses werkzeug.debug.DebuggedApplication (http://werkzeug.pocoo.org/docs/debug/), which uses /console as the default Debug path. Flask itself only has the debug flag,
app.run(debug=True)
with no other options to override that path. What are my options?
I temporarily added the following, but I'd rather not have to do that because I have some intricate thing's going on in JS on the front-end, like a redirect during registration, etc.
if app.debug:
app.register_blueprint(.., url_prefix='/con')
else:
app.register_blueprint(..., url_prefix='/console')
La solution
Set use_evalex=False
in your app.run
call to disable the console but still have reloading and the pretty Werkzeug "Don't Panic" debugger:
if __name__ == '__main__':
app.run(debug=True, use_evalex=False)