Exemplo n.º 1
0
def initialize_app(flask_app):
    configure_app(flask_app)

    blueprint = Blueprint('api', __name__, url_prefix='/api')
    api.init_app(blueprint)
    api.add_namespace(link_search_namespace)
    flask_app.register_blueprint(blueprint)

    db.init_app(flask_app)
Exemplo n.º 2
0
app.config[
    'SQLALCHEMY_TRACK_MODIFICATIONS'] = settings.SQLALCHEMY_TRACK_MODIFICATIONS
app.config[
    'SWAGGER_UI_DOC_EXPANSION'] = settings.RESTPLUS_SWAGGER_UI_DOC_EXPANSION
app.config['RESTPLUS_VALIDATE'] = settings.RESTPLUS_VALIDATE
app.config['RESTPLUS_MASK_SWAGGER'] = settings.RESTPLUS_MASK_SWAGGER
app.config['ERROR_404_HELP'] = settings.RESTPLUS_ERROR_404_HELP

#def initialize_app(flask_app):
#    configure_app(flask_app)

blueprint = Blueprint('api', __name__, url_prefix='/api')
api.init_app(blueprint)
#api.add_namespace(link_search_namespace)
app.register_blueprint(blueprint)
db.init_app(app)

# initial setup
#from ontobio.ontol_factory import OntologyFactory
#factory = OntologyFactory()
#ont = factory.create()


@app.route("/")
def hello():
    return render_template('index.html', base_url=request.base_url)


def main():
    #initialize_app(app)
    log.info(