#NEWLINE# def add_to_app( self , app , **kwargs ) : #NEWLINE# #INDENT# ' Instead of adding a route to the flask application this will\n        include and load routes similar, same as in the\n        :py:class:`flask_via.Via` class.abs\n\n        .. versionchanged:: 2014.05.08\n\n            * ``url_prefix`` now injected into kwargs when loading in routes\n\n        .. versionchanged:: 2014.05.19\n\n            * ``endpoint`` now injects into kwargs when loading in routes\n\n        Arguments\n        ---------\n        app : flask.app.Flask\n            Flask application instance\n        \\*\\*kwargs\n            Arbitrary keyword arguments passed in to ``init_app``\n        ' #NEWLINE# if ( not self . routes_name ) : #NEWLINE# #INDENT# self . routes_name = app . config . get ( 'VIA_ROUTES_NAME' , 'routes' ) #NEWLINE# #UNINDENT# if self . url_prefix : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# url_prefix = kwargs [ 'url_prefix' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# url_prefix = '' #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# kwargs [ 'url_prefix' ] = ( url_prefix + self . url_prefix ) #NEWLINE# #UNINDENT# #UNINDENT# if ( self . endpoint is not None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# endpoint = kwargs [ 'endpoint' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# endpoint = '' #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# kwargs [ 'endpoint' ] = ( ( endpoint + self . endpoint ) + '.' ) #NEWLINE# #UNINDENT# #UNINDENT# routes = self . include ( self . routes_module , self . routes_name ) #NEWLINE# self . load ( app , kwargs , ** kwargs )