builder.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:memex-dossier-open 作者: dossier 项目源码 文件源码
def add_routes(self, routes):
        '''Merges a Bottle application into this one.

        :param routes: A Bottle application or a sequence of routes.
        :type routes: :class:`bottle.Bottle` or `[bottle route]`.
        :rtype: :class:`WebBuilder`
        '''
        # Basically the same as `self.app.merge(routes)`, except this
        # changes the owner of the route so that plugins on `self.app`
        # apply to the routes given here.
        if isinstance(routes, bottle.Bottle):
            routes = routes.routes
        for route in routes:
            route.app = self.app
            self.app.add_route(route)
        return self
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号