diff --git a/rest_framework/generics.py b/rest_framework/generics.py index cda9ca79c..19f2b7047 100644 --- a/rest_framework/generics.py +++ b/rest_framework/generics.py @@ -203,6 +203,10 @@ class RetrieveUpdateAPIView(mixins.RetrieveModelMixin, def put(self, request, *args, **kwargs): return self.update(request, *args, **kwargs) + def patch(self, request, *args, **kwargs): + kwargs['partial'] = True + return self.update(request, *args, **kwargs) + class RetrieveDestroyAPIView(mixins.RetrieveModelMixin, mixins.DestroyModelMixin, @@ -230,9 +234,9 @@ class RetrieveUpdateDestroyAPIView(mixins.RetrieveModelMixin, def put(self, request, *args, **kwargs): return self.update(request, *args, **kwargs) - def delete(self, request, *args, **kwargs): - return self.destroy(request, *args, **kwargs) - def patch(self, request, *args, **kwargs): kwargs['partial'] = True return self.update(request, *args, **kwargs) + + def delete(self, request, *args, **kwargs): + return self.destroy(request, *args, **kwargs)