def setUpClass(cls): cls.app = create_app('test') cls.app_context = cls.app.app_context() cls.app_context.push()
from clock import create_app from flask.ext.script import Manager, Shell app = create_app("production") manager = Manager(app) def make_shell_context(): return dict(app=app) manager.add_command("shell", Shell(make_context=make_shell_context)) if __name__ == "__main__": manager.run()