'Return a string that matches a named route'

def get_url(self, routename, **kargs):

    scriptname = (request.environ.get('SCRIPT_NAME', '').strip('/') + '/')
    location = self.router.build(routename, **kargs).lstrip('/')
    return urljoin(urljoin('/', scriptname), location)
