if reqctx is not None:
    url_adapter = reqctx.url_adapter
else:
    url_adapter = appctx.url_adapter
if url_adapter is None:
    raise RuntimeError(
        'Application was not able to create a URL adapter for request independent URL matching. You might be able to fix this by setting the SERVER_NAME config variable.'
        )
parsed_url = url_parse(url)
if parsed_url.netloc is not '' and parsed_url.netloc != url_adapter.server_name:
    raise NotFound()
return url_adapter.match(parsed_url.path, method)
Возврат URL-адреса в Flask к конечной точке + аргументы