'For generic class based views we return information about
the fields that are accepted for \'PUT\' and \'POST\' methods.'

def determine_actions(self, request, view):

    actions = {}
    for method in ({u'PUT', u'POST'} & set(view.allowed_methods)):
        view.request = clone_request(request, method)
        try:
            if hasattr(view, u'check_permissions'):
                view.check_permissions(view.request)
            if ((method == u'PUT') and hasattr(view, u'get_object')):
                view.get_object()
        except (exceptions.APIException, PermissionDenied, Http404):
            pass
        else:
            serializer = view.get_serializer()
            actions[method] = self.get_serializer_info(serializer)
        finally:
            view.request = request
    return actions
