示例#1
0
def register_blueprints(app):
    from app.api.v1 import create_blueprint_v1
    app.register_blueprint(create_blueprint_v1())
示例#2
0
def register_blueprints(app):

    app.register_blueprint(create_blueprint_v1(), url_prefix='/api')
示例#3
0
def register_blueprints(app):
    from app.api.v1 import create_blueprint_v1
    app.register_blueprint(create_blueprint_v1(),
                           url_prefix='{prefix}/v{version}'.format(
                               prefix=app.config['URL_PREFIX'],
                               version=API_VERSION_V1))
示例#4
0
def register_blueprints(app):
    from app.api.v1 import create_blueprint_v1
    # 这里为什么要带括号
    # app.register_blueprint(create_blueprint_v1())
    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
def register_blueprint(app):
    from app.web.blueprint import web
    from app.api.v1 import create_blueprint_v1
    app.register_blueprint(web)
    # register redPrint to BluePrint
    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
示例#6
0
def register_blueprints(app):
    from app.api.v1 import create_blueprint_v1

    # 蓝图注册到app核心对象上
    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
示例#7
0
def register_blueprint(app):
    """ 注册蓝图 """
    from app.api.v1 import create_blueprint_v1
    from app.api.admin import create_blueprint_admin
    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
    app.register_blueprint(create_blueprint_admin(), url_prefix='/admin')
示例#8
0
def register_blueprints(flask_app):
    from app.api.v1 import create_blueprint_v1

    flask_app.register_blueprint(create_blueprint_v1(), url_prefix="/v1")
示例#9
0
def register_blueprints(app):
    """
    注册 Blueprint
    :param app: flask app
    """
    app.register_blueprint(create_blueprint_v1(), url_prefix='/api/v1')
示例#10
0
文件: app.py 项目: baishaohui/jingle
def register_blueprint(app: Flask):
    from app.api.v1 import create_blueprint_v1
    bp_v1 = create_blueprint_v1()
    app.register_blueprint(bp_v1)
示例#11
0
def register_blueprints(app):

    from app.api.v1 import create_blueprint_v1
    from app.api.v2 import create_blueprint_v2
    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
    app.register_blueprint(create_blueprint_v2(), url_prefix='/v2')
示例#12
0
def register_blueprints(app):
    from app.api.v1 import create_blueprint_v1
    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
    from app.api.sysmng import create_blueprint_sysmng
    # app.register_blueprint(create_blueprint_sysmng())
    app.register_blueprint(create_blueprint_sysmng(), url_prefix='/v1')
示例#13
0
文件: app.py 项目: to2bage/ginger
def register_blueprint(app):
    bp_v1 = create_blueprint_v1()
    app.register_blueprint(bp_v1, url_prefix="/v1")
示例#14
0
def register_blueprint(app):
	from app.api.v1 import create_blueprint_v1
	app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
示例#15
0
def register_blueprints(app):
    """2.在app中注册蓝图"""
    from app.api.v1 import create_blueprint_v1
    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
示例#16
0
def register_blueprints(app):
    from app.api.v1 import create_blueprint_v1
    from app.api.cms import create_blueprint_cms
    app.register_blueprint(create_blueprint_v1(), url_prefix='/master/v1')
    app.register_blueprint(create_blueprint_cms(), url_prefix='/master/cms')
示例#17
0
def register_blueprint(app):
    # app.register_blueprint(user)
    # app.register_blueprint(book)
    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
示例#18
0
def register_blueprints(app):
    from app.api.v1 import create_blueprint_v1
    from app.admin import admin
    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
    app.register_blueprint(admin, url_prefix='/admin')
示例#19
0
def register_blueprints(app):
    # 蓝图注册。先导入蓝图,再用app对蓝图进行注册
    from app.api.v1 import create_blueprint_v1
    # url_prefix可以指定url前缀
    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
示例#20
0
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   File Name:     __init__.py
   Description :
   Author :       loner
   date:          2019-10-29
-------------------------------------------------
"""
from flask import Flask
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy

__author__ = 'loner'

app = Flask(__name__)
db = SQLAlchemy(app)
migrate = Migrate(app, db)
app.config.from_object('app.config.secure')
app.config.from_object('app.config.setting')
from app.api.v1 import create_blueprint_v1
app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
示例#21
0
def register_blueprints(app):
    # from app.api.v1.user import user
    # from app.api.v1.book import book
    from app.api.v1 import create_blueprint_v1
    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
示例#22
0
def register_blueprint(app):
    from app.api.v1 import create_blueprint_v1
    app.register_blueprint(create_blueprint_v1(), url_prefix='/v1')
示例#23
0
def register_blueprints(app):
    from app.api.v1 import create_blueprint_v1
    blueprint = create_blueprint_v1()
    app.register_blueprint(blueprint, url_prefix='/v1')  #给蓝图 路由绑定固定的前缀/v1