docs: def delete(self, request, *args, **kwargs):
          """
          Calls the delete() method on the fetched object and then
          redirects to the success URL.
          """
          self.object = self.get_object()
          success_url = self.get_success_url()
          self.object.delete()
  
          if self.request.is_ajax():
              return JSONResponseMixin.render_to_response(self, context={})
  
          return HttpResponseRedirect(success_url)