# -*- coding: utf-8 -*- """ [module name here] ~~~~~~~~~~~~~~~~~ [Description here] """ from escalante.escalante import create_app if __name__ == '__main__': create_app().run()
""" [module name here] ~~~~~~~~~~~~~~~~~ [Description here] """ from flask_script import Manager, Shell, Server from flask_migrate import MigrateCommand from escalante.escalante import create_app from escalante.models import User from escalante.extensions import db app = create_app() manager = Manager(app) def _make_context(): """Return context dict for a shell session so you can access app, db, and the User model by default. """ return {'app': app, 'db': db, 'User': User} manager.add_command('server', Server()) manager.add_command('shell', Shell(make_context=_make_context)) manager.add_command('db', MigrateCommand)