• wanli's avatar
    update · fe703f3c
    wanli authored
    fe703f3c
router.tpl 400 Bytes
# -*- coding: utf-8 -*-

from flask import Blueprint
from flask_restful import Api

from . import {% for i, router in enumerate(routers) in  %}{% if i != 0 %},{% endif %}{{ router }}{% endfor %}

api_v1 = Blueprint('api_v1', __name__)

api = Api(api_v1)

{% for v in views %}
api.add_resource({{ name }}.{{ clasName }}, '{{ path }}'{% if endpoint %}, endpoint={{ endpoint }}{% endif %})
{% endfor %}