original_docstring: 
          Function to perform a DELETE given a primary key value
  
          :param request: the request done to the API, needed to check the auth.
          :param model: the database model that is going to be searched.
          :param key: the column name for the primary key.
          :param value: the value for the primary key that has to be searched.
          :return:
          
docstring: Function to perform a DELETE given a primary key value
docstring_tokens: Function to perform a DELETE given a primary key value
code: def delete_detail(self, request, model, key, value):
          """
          Function to perform a DELETE given a primary key value
  
          :param request: the request done to the API, needed to check the auth.
          :param model: the database model that is going to be searched.
          :param key: the column name for the primary key.
          :param value: the value for the primary key that has to be searched.
          :return:
          """
          try:
              instance = getattr(model.objects, 'get')([key, value])
          except model.DoesNotExist:
              return Response({'message': 'No available data'}, status=status.HTTP_204_NO_CONTENT)
          if instance is None:
              return Response({'message': 'No available data'}, status=status.HTTP_204_NO_CONTENT)
          instance.delete()
          return Response({'message': 'Data has been deleted'}, status=status.HTTP_200_OK)
code_tokens: def delete_detail ( self , request , model , key , value ) : try : instance = getattr ( model . objects , 'get' ) ( [ key , value ] ) except model . DoesNotExist : return Response ( { 'message' : 'No available data' } , status = status . HTTP_204_NO_CONTENT ) if instance is None : return Response ( { 'message' : 'No available data' } , status = status . HTTP_204_NO_CONTENT ) instance . delete ( ) return Response ( { 'message' : 'Data has been deleted' } , status = status . HTTP_200_OK )
short_docstring: Function to perform a DELETE given a primary key value
short_docstring_tokens: Function to perform a DELETE given a primary key value
comment: """
          Function to perform a DELETE given a primary key value
  
          :param request: the request done to the API, needed to check the auth.
          :param model: the database model that is going to be searched.
          :param key: the column name for the primary key.
          :param value: the value for the primary key that has to be searched.
          :return:
          """