示例#1
0
def run():
    """
    This method runs the flask app using manager command 
    after adding the routes using the methods in routes folder
    """
    add_resources(app)
    register_blueprints(app)
    app.run()
示例#2
0
文件: manage.py 项目: nitu023/akira
def run():
    # import pdb; pdb.set_trace()
    """
    This method runs the flask app using manager command 
    after adding the routes using the methods in routes folder
    """
    add_resources(app)
    app.register_blueprint(api_blueprint)
    register_blueprints(app)
    app.run()
示例#3
0
def run():
    register_blueprints(app)
    app.run()
示例#4
0
from flask import Flask
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
from app.main import create_app, db
from app.main.routes import add_resources, register_blueprints
from app.main.models import *
from app.main import api, api_blueprint

app = create_app(os.getenv("FLASK_ENV") or "dev")
app.app_context().push()
manager = Manager(app)
migrate = Migrate(app, db, render_as_batch=True)
manager.add_command("db", MigrateCommand)
add_resources(app)
app.register_blueprint(api_blueprint)
register_blueprints(app)

#app = Flask(__name__)

# @app.route('/')
# def hello_world():
#     return 'Hello World! Parth'


@manager.command
def run():
    """
    This method runs the flask app using manager command
    after adding the routes using the methods in routes folder
    """
    add_resources(app)