def url_name(request):
    try:
        match = resolve(request.path)
    except Resolver404:
        return {}
    else:
        namespace, url_name  = match.namespace, match.url_name
        if namespace:
            url_name = "%s:%s" % (namespace, url_name)
        return {'URL_NAMESPACE': namespace, 'URL_NAME': url_name}
dataset/ETHPy150Open python/pythondotorg/pydotorg/context_processors.py/url_name/original