Skip to content

Instantly share code, notes, and snippets.

@LondonAppDev
Created June 4, 2019 18:21
Show Gist options
  • Save LondonAppDev/41cc51148601a35d6ce422849383c9d9 to your computer and use it in GitHub Desktop.
Save LondonAppDev/41cc51148601a35d6ce422849383c9d9 to your computer and use it in GitHub Desktop.
C1 views.py
def put(self, request, pk=None):
"""Handle updating an object"""
return Response({'method': 'PUT'})
def patch(self, request, pk=None):
"""Handle partial update of object"""
return Response({'method': 'PATCH'})
def delete(self, request, pk=None):
"""Delete an object"""
return Response({'method': 'DELETE'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment