from app import create_app
from flask_script import Manager,Shell,Server
from app.models import User,Role
from flask_migrate import Migrate, MigrateCommand
# Creating app instance
app = create_app('development')

manager = Manager(app)
migrate = Migrate(app,db)
manager.add_command('db',MigrateCommand)

@manager.command
def test():
    """Run the unit tests."""
    import unittest
    test = unittest.TestLoader().discover('tests')
    unittest.TextTestRunner(verbosity=2).run(test)
@manager.shell
def make_shell_context():
 return dict(app = app,db = db,User = User, Role = Role )

if __name__ == '__main__':
    manager.run()

   
   
from app import create_app
from flask_script import Manager,Shell,Server
from app.models import User,Role
from flask_migrate import Migrate, MigrateCommand
# Creating app instance
app = create_app('development')

manager = Manager(app)
migrate = Migrate(app,db)
manager.add_command('db',MigrateCommand)

@manager.command
def test():
    """Run the unit tests."""
    import unittest
    test = unittest.TestLoader().discover('tests')
    unittest.TextTestRunner(verbosity=2).run(test)
@manager.shell
def make_shell_context():
 return dict(app = app,db = db,User = User, Role = Role )

if __name__ == '__main__':
    manager.run()

   
   
# Creating app instance Run the unit tests.