is_valid_path
Return the ResolverMatch if the given path resolves against the default URL resolver, False otherwise. This is a convenience method to make working with "is this a match?" cases easier, avoiding try...except blocks.
def is_valid_path(
path: str,
urlconf: str | None = None
) - > ResolverMatch | bool
Return the ResolverMatch if the given path resolves against the default URL resolver, False otherwise. This is a convenience method to make working with "is this a match?" cases easier, avoiding try...except blocks.
Parameters
| Name | Type | Description |
|---|---|---|
| path | str | The URL path string to be tested against the application's URL configuration. |
| urlconf | `str | None` = None |
Returns
| Type | Description |
|---|---|
| `ResolverMatch | bool` |