按照 Fask Web Development 中的代碼 from flask.ext.script import Managerpython
結果報錯 ImportError: No module named 'flask.ext'shell
經查詢,官方已經修改了語法from flask_script import Managerflask
結果以下:
app
(venv) leslie@leslie-Lenovo-G400 ~/flasky/venv $ python hello.py
usage: hello.py [-?] {shell,runserver} ...
positional arguments:
{shell,runserver}
shell Runs a Python shell inside Flask application context.
runserver Runs the Flask development server i.e. app.run()
optional arguments:
-?, --help show this help message and exit
ide
Done.this
本文僅做鼓勵本身更新博客。spa