from flask_script import Manager, Shell, Command
from app import app, db
from app.models import User
manager = Manager(app)
if __name__ == '__main__':

    def make_shell_context():
        return dict(app=app, db=db, User=User)

    def init():
        db.drop_all()
        db.create_all()
        print('Init success!')
    manager.add_command('shell', Shell(make_context=make_shell_context))
    manager.add_command('init', Command(func=init))
    manager.run()

edfec521d19fa854b4e118a1ed80eee5c8960006
<mask token>

<mask token>
if __name__ == '__main__':

    def make_shell_context():
        return dict(app=app, db=db, User=User)

    def init():
        db.drop_all()
        db.create_all()
        print('Init success!')
    manager.add_command('shell', Shell(make_context=make_shell_context))
    manager.add_command('init', Command(func=init))
    manager.run()

<mask token>
manager = Manager(app)
if __name__ == '__main__':

    def make_shell_context():
        return dict(app=app, db=db, User=User)

    def init():
        db.drop_all()
        db.create_all()
        print('Init success!')
    manager.add_command('shell', Shell(make_context=make_shell_context))
    manager.add_command('init', Command(func=init))
    manager.run()

from flask_script import Manager, Shell, Command
from app import app, db
from app.models import User
manager = Manager(app)
if __name__ == '__main__':

    def make_shell_context():
        return dict(app=app, db=db, User=User)

    def init():
        db.drop_all()
        db.create_all()
        print('Init success!')
    manager.add_command('shell', Shell(make_context=make_shell_context))
    manager.add_command('init', Command(func=init))
    manager.run()
