def uri_for(_name, _request=None, *args, **kwargs):
 request = (_request or get_request())
 return request.app.router.build(request, _name, args, kwargs)

def uri_for ( _name , _request = None , * args , ** kwargs ) : request = ( _request or get_request ( ) ) return request . app . router . build ( request , _name , args , kwargs )
a standalone uri_for version that can be passed to templates .