Loading... # Flask Shell集成 可能你也会发现一直利用 print 输出调试信息不太方便,这当然有解决办法: 1. Code 已经支持 Flask 调试 2. Flask 提供了 Shell 集成的插件 下面将介绍第二种方案,特别简单 :) ```shell pip install flask_script ``` 以 Flask-SQL 章节为例: ```python @app.shell_context_processor def make_shell_context(): return dict(db=db, User=User, Role=Role) ``` 最后当然是今天的 [Code](https://code.uniartisan.com/lizhiyuan/Flask_Notebook_Code/commit/a9899c11a8ea42a0ecb4051a30db38ed7db78796) 本站由 硅云 提供支持 Last modification:April 17, 2021 © Allow specification reprint Support Appreciate the author AliPayWeChat Like If you think my article is useful to you, please feel free to appreciate