def setup_view(app, config):
    """Configure view

    url route configure.

    :param app: Flask app object
    :param config: view's config
    :type  config: dict
    """
    from .view import CView

    app.jinja_env.globals.update(rst_to_html=rst_to_html)

    for package_path in config:
        iterate_package(import_module(package_path))

    for view in CView.__subclasses__():
        name = class_name_to_api_name(view.__name__)
        uri = '/%s/%s' % (view.__module__.split('.')[0], name)
        endpoint = (view.__module__.split('.')[0], name) % '%s.%s'
        app.add_url_rule(uri, view_func=view.as_view(endpoint, uri, app))
dataset/ETHPy150Open remyzane/flask-http-api/http_api/configure.py/setup_view/swapped operands of `%`