def run():
"""Run the CLI manager for the web application
.. todo:: allow extension add options & commands,
separate create and run part of function
command for checking config
"""
manager = flask_script.Manager(create_app)
manager.add_option('-c', '--config', dest='cfg_files',
required=False, action='append',
default=['DEFAULT'])
manager.add_option('-v', '--version', action='version',
version='{} v{}'.format(PROG_NAME, VERSION))
manager.add_command('db', flask_migrate.MigrateCommand)
manager.add_command('db-create', DbCreateCommand)
manager.add_command('repocheck', RepocheckCommand)
manager.add_command('assign-role', AssignRoleCommand)
manager.add_command('check-config', CheckConfigCommand)
manager.run()
评论列表
文章目录