Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Str Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad Str For NameStore NameLoad body If CompareIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad Str UnaryOpNot Call NameLoad NameLoad Str body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list Expr Call NameLoad NameLoad NameLoad keyword TupleLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr keyword TupleLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Return Call NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareEq NameLoad Str body Assign AttributeStore NameLoad attr Str orelse Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Expr Str Pass decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr body Expr Str Pass decorator_list ClassDef bases AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad body Expr Str Pass decorator_list ClassDef bases AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad body Expr Str Pass decorator_list
N/A N/A 
ViewSets are essentially just a type of class based view, that doesn't provide
any method handlers, such as `get()`, `post()`, etc... but instead has actions,
such as `list()`, `retrieve()`, `create()`, etc...

Actions are only bound to methods at the point of instantiating the views.

    user_list = UserViewSet.as_view({'get': 'list'})
    user_detail = UserViewSet.as_view({'get': 'retrieve'})

Typically, rather than instantiate views from viewsets directly, you'll
register the viewset with a router and let the URL conf be determined
automatically.

    router = DefaultRouter()
    router.register(r'users', UserViewSet, 'user')
    urlpatterns = router.urls
 __future__ unicode_literals functools update_wrapper django.utils.decorators classonlymethod django.views.decorators.csrf csrf_exempt rest_framework generics mixins views ViewSetMixin N/A object N/A N/A 
    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'})
     as_view N/A N/A cls actions N/A None initkwargs N/A N/A 
        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.
         N/A N/A cls suffix None N/A N/A actions N/A N/A N/A TypeError The `actions` argument must be provided when calling `.as_view()` on a ViewSet. For example `.as_view({'get': 'list'})` N/A key initkwargs N/A N/A N/A key N/A cls http_method_names N/A N/A N/A TypeError N/A You tried to pass in the %s method name as a keyword argument to %s(). Don't do that. N/A key N/A cls __name__ N/A N/A N/A hasattr cls key N/A N/A N/A TypeError N/A %s() received an invalid keyword %r N/A N/A cls __name__ key view N/A N/A request N/A args kwargs N/A N/A self N/A cls initkwargs N/A N/A self action_map actions N/A N/A method action N/A N/A actions items N/A N/A handler N/A getattr self action N/A N/A setattr self method handler N/A N/A N/A hasattr self get N/A N/A hasattr self head N/A N/A N/A self head N/A self get N/A N/A N/A self dispatch request args kwargs N/A N/A N/A update_wrapper view cls updated N/A N/A N/A update_wrapper view N/A cls dispatch assigned N/A N/A N/A view cls cls N/A N/A view suffix N/A N/A initkwargs get suffix None N/A N/A csrf_exempt view N/A classonlymethod initialize_request N/A N/A self request N/A args kwargs N/A N/A 
        Set the `.action` attribute on the view,
        depending on the request method.
         N/A request N/A N/A N/A super ViewSetMixin self initialize_request request args kwargs N/A method N/A N/A N/A request method lower N/A N/A method options N/A N/A N/A self action metadata N/A N/A N/A self action N/A N/A N/A self action_map get method N/A request N/A N/A ViewSet N/A ViewSetMixin N/A views APIView N/A N/A 
    The base ViewSet class does not provide any actions by default.
     N/A N/A GenericViewSet N/A ViewSetMixin N/A generics GenericAPIView N/A N/A 
    The GenericViewSet class does not provide any actions by default,
    but does include the base set of generic view behavior, such as
    the `get_object` and `get_queryset` methods.
     N/A N/A ReadOnlyModelViewSet N/A N/A mixins RetrieveModelMixin N/A mixins ListModelMixin GenericViewSet N/A N/A 
    A viewset that provides default `list()` and `retrieve()` actions.
     N/A N/A ModelViewSet N/A N/A mixins CreateModelMixin N/A mixins RetrieveModelMixin N/A mixins UpdateModelMixin N/A mixins DestroyModelMixin N/A mixins ListModelMixin GenericViewSet N/A N/A 
    A viewset that provides default `create()`, `retrieve()`, `update()`,
    `partial_update()`, `destroy()` and `list()` actions.
     N/A N/A