Router

Router class definitions

Route

class restae.router.Route(**kwargs)[source]

A route mapping representation contains the URL, METHOD and route type

Url

class restae.router.Url(**kwargs)[source]

An URL representation contains the Route and the destination Handler

Router

class restae.router.Router[source]

The default router

get_lookup_regex(handler)[source]

Given a handler, return the portion of URL regex that is used to match against a single instance.

get_method_map(handler, method_map)[source]

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

get_routes(handler)[source]

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

get_urls()[source]

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