module documentation

The most important decorator in this module is `@api_view`, which is used for writing function-based views with REST framework. There are also various decorators for setting the API policies on function based views, as well as the `@action` decorator, which is used to annotate methods on viewsets that should be included by routers.

Class MethodMapper Enables mapping HTTP methods to different ViewSet methods for a single, logical action.
Function action Mark a ViewSet method as a routable action.
Function api_view Decorator that converts a function-based view into an APIView subclass. Takes a list of allowed methods for the view as an argument.
Function authentication_classes Undocumented
Function parser_classes Undocumented
Function permission_classes Undocumented
Function renderer_classes Undocumented
Function schema Undocumented
Function throttle_classes Undocumented
def action(methods=None, detail=None, url_path=None, url_name=None, **kwargs): (source)

Mark a ViewSet method as a routable action. `@action`-decorated functions will be endowed with a `mapping` property, a `MethodMapper` that can be used to add additional method-based behaviors on the routed action. :param methods: A list of HTTP method names this action responds to. Defaults to GET only. :param detail: Required. Determines whether this action applies to instance/detail requests or collection/list requests. :param url_path: Define the URL segment for this action. Defaults to the name of the method decorated. :param url_name: Define the internal (`reverse`) URL name for this action. Defaults to the name of the method decorated with underscores replaced with dashes. :param kwargs: Additional properties to set on the view. This can be used to override viewset-level *_classes settings, equivalent to how the `@renderer_classes` etc. decorators work for function- based API views.

def api_view(http_method_names=None): (source)

Decorator that converts a function-based view into an APIView subclass. Takes a list of allowed methods for the view as an argument.

def authentication_classes(authentication_classes): (source)

Undocumented

def parser_classes(parser_classes): (source)

Undocumented

def permission_classes(permission_classes): (source)

Undocumented

def renderer_classes(renderer_classes): (source)

Undocumented

def schema(view_inspector): (source)

Undocumented

def throttle_classes(throttle_classes): (source)

Undocumented