Skip to main content

resolve

Resolves URL paths to callback functions by looking up the path in the specified or default URL configuration.

def resolve(
path: string,
urlconf: string = null
) - > ResolverMatch

Resolves a URL path to a ResolverMatch object by looking up the path against the provided or default URL configuration.

Parameters

NameTypeDescription
pathstringThe URL path to be resolved, typically excluding the domain name.
urlconfstring = nullThe module path to the URL configuration to use for resolution; defaults to the current thread's URLconf if not provided.

Returns

TypeDescription
ResolverMatchAn object containing the matched view function, arguments, and URL name if a match is found.