def main( ): # main方法是什么都不干,就是定义一个run方法 ; 在引入flask_script之后,有了manager和Sever,这里可以把原本的app.run(host='0.0.0.0', debug=True),改成以下内容 manager.run() # 在运行一下,提示无法跑了,提示如下: # 可以通过python manager.py runserver来运行 # 然后在base_setting.py中配置一下端口 """
def main(): manager.run()
def main(): # app.run(host='0.0.0.0',debug=True) manager.run()
#!/usr/bin/env python3 """ Manager """ import unittest from application import manager, app #pylint: disable=unused-import @manager.command def test(): """Runs unit tests.""" tests = unittest.TestLoader().discover('application/tests', pattern='test*.py') result = unittest.TextTestRunner(verbosity=2).run(tests) if result.wasSuccessful(): return 0 return 1 if __name__ == '__main__': manager.run()
def main(): # app.run(host="0.0.0.0", debug=True) manager.run()
def main(): manager.run() # 使用自定义启动方法,启动为manager.py runserver
def main(): app.config['JSON_AS_ASCII'] = False manager.run()
from application import manager manager.run()
def main(): # app.run( host='0.0.0.0', debug= True ) print("Hello This is Test.") print("Root_path is :%s" % app.root_path) manager.run()
def main(): db.create_all() manager.run()
def main(): register() manager.run()
def main(): # app.config['JOBS'] # scheduler = APScheduler() # scheduler.init_app(app) # scheduler.start() manager.run()
def main(): app.logger.info("*******服务已重启*******") manager.run()
def app_run(): manager.run()
def main(): manager.run() app.logger.info(www.is_import())