MCPcopy
hub / github.com/django/django / resolve

Method resolve

django/urls/resolvers.py:471–485  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

469 return []
470
471 def resolve(self, path):
472 match = self.pattern.match(path)
473 if match:
474 new_path, args, captured_kwargs = match
475 # Pass any default args as **kwargs.
476 kwargs = {**captured_kwargs, **self.default_args}
477 return ResolverMatch(
478 self.callback,
479 args,
480 kwargs,
481 self.pattern.name,
482 route=str(self.pattern),
483 captured_kwargs=captured_kwargs,
484 extra_kwargs=self.default_args,
485 )
486
487 @cached_property
488 def lookup_str(self):

Callers 4

iter_modules_and_filesFunction · 0.45
sys_path_directoriesFunction · 0.45
resolveFunction · 0.45
resolveMethod · 0.45

Calls 2

ResolverMatchClass · 0.85
matchMethod · 0.45

Tested by

no test coverage detected