class documentation

Undocumented

Method __init__ Undocumented
Method get_default_basename If `basename` is not specified, attempt to automatically determine it from the viewset.
Method get_lookup_regex Given a viewset, return the portion of URL regex that is used to match against a single instance.
Method get_method_map Given a viewset, and a mapping of http methods to actions, return a new mapping which only includes any mappings that are actually implemented by the viewset.
Method get_routes Augment `self.routes` with any dynamically generated routes.
Method get_urls Use the registered viewsets to generate a list of URL patterns.
Class Variable routes Undocumented
Instance Variable trailing_slash Undocumented
Method _get_dynamic_route Undocumented

Inherited from BaseRouter:

Method register Undocumented
Instance Variable registry Undocumented
Property urls Undocumented
def __init__(self, trailing_slash=True): (source)
def get_default_basename(self, viewset): (source)

If `basename` is not specified, attempt to automatically determine it from the viewset.

def get_lookup_regex(self, viewset, lookup_prefix=''): (source)

Given a viewset, return the portion of URL regex that is used to match against a single instance. Note that lookup_prefix is not used directly inside REST rest_framework itself, but is required in order to nicely support nested router implementations, such as drf-nested-routers. https://github.com/alanjds/drf-nested-routers

def get_method_map(self, viewset, method_map): (source)

Given a viewset, and a mapping of http methods to actions, return a new mapping which only includes any mappings that are actually implemented by the viewset.

def get_routes(self, viewset): (source)

Augment `self.routes` with any dynamically generated routes. Returns a list of the Route namedtuple.

def get_urls(self): (source)

Use the registered viewsets to generate a list of URL patterns.

Undocumented

trailing_slash = (source)

Undocumented

def _get_dynamic_route(self, route, action): (source)

Undocumented