'Performs the requested action. This version dispatches to named
functions by default for update/create, and handles delete itself.'

def run_action(self, action, pk, data):

    if self.has_permission(self.user, action, pk):
        if (action == u'create'):
            self.create(data)
        elif (action == u'update'):
            self.update(pk, data)
        elif (action == u'delete'):
            self.delete(pk)
        else:
            raise ValueError((u'Bad    action    %r' % action))
