Python rest_framework.generics.RetrieveUpdateDestroyAPIView() Examples

The following are 1 code examples of rest_framework.generics.RetrieveUpdateDestroyAPIView(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module rest_framework.generics , or try the search function .
Example #1
Source File: views.py    From readux with MIT License 5 votes vote down vote up
def get(self, request, *args, **kwargs):
        # TODO Does this view need owners?
        # owners = [request.user.id]
        return JsonResponse(
            json.loads(
                serialize(
                    'annotation',
                    self.get_queryset(),
                    # version=kwargs['version'],
                    # owners=owners,
                    is_list = True
                )
            ),
            safe=False
        )


# class AnnotationDetail(generics.RetrieveUpdateDestroyAPIView):
#     """
#     Endpoint to update and delete annotation.
#     """
#     serializer_class = AnnotationSerialize

#     def get_queryset(self):
#         return Annotation.objects.all()