'Function deletes object with record_id'

def delete(self, request, record_id=None, *args, **kwargs):

    if (not record_id):
        return rc.BAD_REQUEST
    try:
        inst = self.model.objects.get(pk=record_id)
        inst.delete()
        return rc.DELETED
    except self.model.MultipleObjectsReturned:
        return rc.DUPLICATE_ENTRY
    except self.model.DoesNotExist:
        return rc.NOT_HERE
