def create_app(self): app = create_app('testing') app.config['TESTING'] = True return app
#!/usr/bin/env python import os import sys from flask.ext.script import Manager, prompt, Shell from flask.ext.migrate import Migrate, MigrateCommand from monetario.app import create_app from monetario.models import App from monetario.models import User from monetario.extensions import db app = create_app() manager = Manager(app) migrate = Migrate(app, db) def make_shell_context(): return {'app': app, 'db': db, 'User': User} manager.add_command("shell", Shell(make_context=make_shell_context)) manager.add_command('db', MigrateCommand) API_APPS = [{ 'name': 'WEB', 'secret': 'eyJpYXQiOjE0NTc1NTc0MDYsImV4cCI6MTYxNTIzNzQwNiwiYWxnIjoiSFMyNTYifQ.eyJpZCI6MX0.FIVRju7qroqF1UYFG3d8e_gAUVQbzHWmjjAhgrl4KKw', }]
#!/usr/bin/env python import os import sys from flask.ext.script import Manager, prompt, Shell from flask.ext.migrate import Migrate, MigrateCommand from monetario.app import create_app from monetario.models import App from monetario.models import User from monetario.extensions import db app = create_app() manager = Manager(app) migrate = Migrate(app, db) def make_shell_context(): return {'app': app, 'db': db, 'User': User} manager.add_command("shell", Shell(make_context=make_shell_context)) manager.add_command('db', MigrateCommand) API_APPS = [ { 'name': 'WEB', 'secret': 'eyJpYXQiOjE0NTc1NTc0MDYsImV4cCI6MTYxNTIzNzQwNiwiYWxnIjoiSFMyNTYifQ.eyJpZCI6MX0.FIVRju7qroqF1UYFG3d8e_gAUVQbzHWmjjAhgrl4KKw', } ]