rest_witchcraft.routers module

class rest_witchcraft.routers.DefaultRouter(*args, **kwargs)[source]

Bases: rest_framework.routers.DefaultRouter

get_default_base_name(viewset)[source]
get_default_basename(viewset)
get_lookup_regex(viewset, lookup_prefix='')[source]

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

Can be overwritten by providing a lookup_url_regex on the viewset.