Skip to content

Instantly share code, notes, and snippets.

@LondonAppDev
Created June 4, 2019 18:21
Show Gist options
  • Select an option

  • Save LondonAppDev/41cc51148601a35d6ce422849383c9d9 to your computer and use it in GitHub Desktop.

Select an option

Save LondonAppDev/41cc51148601a35d6ce422849383c9d9 to your computer and use it in GitHub Desktop.

Revisions

  1. LondonAppDev created this gist Jun 4, 2019.
    14 changes: 14 additions & 0 deletions views.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    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'})