package documentation

Undocumented

Module base Undocumented
Module conf Functions for use in URLsconfs.
Module converters Undocumented
Module exceptions Undocumented
Module resolvers This module converts requested URLs to callback view functions.
Module utils Undocumented

From __init__.py:

Class LocalePrefixPattern Undocumented
Class ResolverMatch Undocumented
Class URLPattern No class docstring; 1/1 property, 0/4 instance variable, 1/6 method documented
Class URLResolver No class docstring; 0/5 property, 0/12 instance variable, 0/10 method, 1/2 static method documented
Exception NoReverseMatch Undocumented
Exception Resolver404 Undocumented
Function clear_script_prefix Unset the script prefix for the current thread.
Function clear_url_caches Undocumented
Function get_callable Return a callable corresponding to lookup_view. * If lookup_view is already a callable, return it. * If lookup_view is a string import path that can be resolved to a callable, import that callable and return it, otherwise raise an exception (ImportError or ViewDoesNotExist).
Function get_mod_func Undocumented
Function get_ns_resolver Undocumented
Function get_resolver Undocumented
Function get_script_prefix Return the currently active script prefix. Useful for client code that wishes to construct their own URLs manually (although accessing the request instance is normally going to be a lot cleaner).
Function get_urlconf Return the root URLconf to use for the current thread if it has been changed from the default one.
Function include Undocumented
Function 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...
Function register_converter Undocumented
Function resolve Undocumented
Function reverse Undocumented
Function set_script_prefix Set the script prefix for the current thread.
Function set_urlconf Set the URLconf for the current thread (overriding the default one in settings). If urlconf_name is None, revert back to the default.
Function translate_url Given a URL (absolute or relative), try to get its translated version in the `lang_code` language (either by i18n_patterns or by translated regex). Return the original URL if no translated version is found.
Variable path Undocumented
Variable re_path Undocumented
Variable reverse_lazy Undocumented
def clear_script_prefix(): (source)

Unset the script prefix for the current thread.

def clear_url_caches(): (source)

Undocumented

def get_script_prefix(): (source)

Return the currently active script prefix. Useful for client code that wishes to construct their own URLs manually (although accessing the request instance is normally going to be a lot cleaner).

def get_urlconf(default=None): (source)

Return the root URLconf to use for the current thread if it has been changed from the default one.

def is_valid_path(path, urlconf=None): (source)

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 resolve(path, urlconf=None): (source)

Undocumented

def reverse(viewname, urlconf=None, args=None, kwargs=None, current_app=None): (source)

Undocumented

reverse_lazy = (source)

Undocumented

def set_script_prefix(prefix): (source)

Set the script prefix for the current thread.

def set_urlconf(urlconf_name): (source)

Set the URLconf for the current thread (overriding the default one in settings). If urlconf_name is None, revert back to the default.

def translate_url(url, lang_code): (source)

Given a URL (absolute or relative), try to get its translated version in the `lang_code` language (either by i18n_patterns or by translated regex). Return the original URL if no translated version is found.

def include(arg, namespace=None): (source)

Undocumented

Undocumented

Undocumented

def register_converter(converter, type_name): (source)

Undocumented

@functools.lru_cache(maxsize=None)
def get_ns_resolver(ns_pattern, resolver, converters): (source)

Undocumented

def get_resolver(urlconf=None): (source)

Undocumented

@functools.lru_cache(maxsize=None)
def get_callable(lookup_view): (source)

Return a callable corresponding to lookup_view. * If lookup_view is already a callable, return it. * If lookup_view is a string import path that can be resolved to a callable, import that callable and return it, otherwise raise an exception (ImportError or ViewDoesNotExist).

def get_mod_func(callback): (source)

Undocumented