示例#1
0
文件: wsgi.py 项目: nosqlly/Todo-App
from app import application, api
from app.users.views import users_ns
from app.auth.views import auth_ns
from app.task_rooms.views import taskrooms_ns
from app.task_rooms.tasks.views import tasks_ns

api.add_namespace(users_ns, '/api/v1/users')
api.add_namespace(auth_ns, '/api/v1/auth')
api.add_namespace(taskrooms_ns, '/api/v1/task_rooms')
api.add_namespace(tasks_ns, '/api/v1/tasks')

if __name__ == '__main__':
    application.run(host='0.0.0.0')

示例#2
0
from app import api
from .auth.auth import api as auth_api
from .user.user import api as user_api

api.add_namespace(auth_api)
api.add_namespace(user_api)
示例#3
0
def register_resources(api):
    schedule_regularly()
    api.add_namespace(upcoming_events_ns)
示例#4
0
def register_resources(api):
    api.add_namespace(file_system_ns)
示例#5
0
from app import application, api
from app.users.views import users_ns

api.add_namespace(users_ns, '/api/v1/users')

from app.auth.views import auth_ns
api.add_namespace(auth_ns, '/api/v1/auth')

from app.inventory.views import inventory_ns
api.add_namespace(inventory_ns, '/api/v1/inventory')

from app.hosts.views import hosts_ns
api.add_namespace(hosts_ns, '/api/v1/hosts')

from app.groups.views import groups_ns
api.add_namespace(groups_ns, '/api/v1/groups')
'''
from app.task_rooms.views import taskrooms_ns
api.add_namespace(taskrooms_ns, '/api/v1/task_rooms')

from app.tasks.views import tasks_ns
api.add_namespace(tasks_ns, '/api/v1/tasks')
'''
if __name__ == '__main__':
    application.run(host='0.0.0.0')
示例#6
0
def register_resources(api):
    api.add_namespace(search_engine_ns)
示例#7
0
def init_app(app, **kwargs):
    from . import models, resources
    api.add_namespace(resources.api)
示例#8
0
def register_resources(api):
    schedule_regularly()
    api.add_namespace(profile_management_ns)
示例#9
0
from flask_restplus import Namespace
from app import api

ns = Namespace("view")
api.add_namespace(ns)


@ns.route("/")
def get_user():
    print("jinyilun")
    return "yes sucess"