get_ns_resolver
Build a namespaced resolver for the given parent URLconf pattern.
def get_ns_resolver(
ns_pattern: str,
resolver: URLResolver,
converters: dict
) - > URLResolver
Builds a namespaced resolver for the given parent URLconf pattern, enabling the use of captured parameters within the parent pattern.
Parameters
| Name | Type | Description |
|---|---|---|
| ns_pattern | str | The regex pattern string representing the namespace prefix to be applied. |
| resolver | URLResolver | The existing URL resolver whose patterns will be wrapped within the new namespace. |
| converters | dict | A mapping of path converter names to their respective converter instances for parameter transformation. |
Returns
| Type | Description |
|---|---|
URLResolver | A nested URLResolver instance configured with the namespaced pattern and the original resolver's URL patterns. |