fromflask.ext.scriptimportManager
from myapp import app manager = Manager(app) @manager.command def hello(): print "hello" if __name__ == "__main__": manager.run()运行后为什么会出现 RuntimeError: working outside of application context