class SimpleRouter(BaseRouter): (source)
Known subclasses: rest_framework.routers.DefaultRouter
Undocumented
Method | __init__ |
Undocumented |
Method | get |
If `basename` is not specified, attempt to automatically determine it from the viewset. |
Method | get |
Given a viewset, return the portion of URL regex that is used to match against a single instance. |
Method | get |
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 |
Augment `self.routes` with any dynamically generated routes. |
Method | get |
Use the registered viewsets to generate a list of URL patterns. |
Class Variable | routes |
Undocumented |
Instance Variable | trailing |
Undocumented |
Method | _get |
Undocumented |
Inherited from BaseRouter
:
Method | register |
Undocumented |
Instance Variable | registry |
Undocumented |
Property | urls |
Undocumented |
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
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.
Augment `self.routes` with any dynamically generated routes. Returns a list of the Route namedtuple.
rest_framework.routers.DefaultRouter
Use the registered viewsets to generate a list of URL patterns.