'Locates the appropriate action and routes the object data to it.
The action should return an HTTP redirect if successful,
or a value which evaluates to ``False`` if unsuccessful.'

def take_action(self, action_name, obj_id=None, obj_ids=None):

    obj_ids = (obj_ids or self.request.POST.getlist('object_ids'))
    action = self.base_actions.get(action_name, None)
    if ((not action) or (action.method != self.request.method)):
        return None
    if ((not action.requires_input) or obj_id or obj_ids):
        if obj_id:
            obj_id = self.sanitize_id(obj_id)
        if obj_ids:
            obj_ids = [self.sanitize_id(i) for i in obj_ids]
        if (not action.handles_multiple):
            response = action.single(self, self.request, obj_id)
        else:
            if obj_id:
                obj_ids = [obj_id]
            response = action.multiple(self, self.request, obj_ids)
        return response
    elif (action and action.requires_input and (not (obj_id or obj_ids))):
        messages.info(self.request, _('Please    select    a    row    before    taking    that    action.'))
    return None
