class documentation

This is the magic. Overrides `.as_view()` so that it takes an `actions` keyword that performs the binding of HTTP methods to actions on the Resource. For example, to create a concrete view binding the 'GET' and 'POST' methods to the 'list' and 'create' actions... view = MyViewSet.as_view({'get': 'list', 'post': 'create'})

Class Method get_extra_actions Get the methods that are marked as an extra ViewSet `@action`.
Method as_view Because of the way class based views create a closure around the instantiated view, we need to totally reimplement `.as_view`, and slightly modify the view function that is created and returned.
Method get_extra_action_url_map Build a map of {names: urls} for the extra actions.
Method initialize_request Set the `.action` attribute on the view, depending on the request method.
Method reverse_action Reverse the action for the given `url_name`.
Instance Variable action Undocumented
@classmethod
def get_extra_actions(cls): (source)

Get the methods that are marked as an extra ViewSet `@action`.

@classonlymethod
def as_view(cls, actions=None, **initkwargs): (source)

Because of the way class based views create a closure around the instantiated view, we need to totally reimplement `.as_view`, and slightly modify the view function that is created and returned.

def get_extra_action_url_map(self): (source)

Build a map of {names: urls} for the extra actions. This method will noop if `detail` was not provided as a view initkwarg.

def initialize_request(self, request, *args, **kwargs): (source)

Set the `.action` attribute on the view, depending on the request method.

def reverse_action(self, url_name, *args, **kwargs): (source)

Reverse the action for the given `url_name`.

Undocumented