def _prepare_change_view_action(self, action): if isinstance(action, str) or isinstance(action, unicode): action = getattr(self, action) view = action_to_view(action, self) view.url_name = getattr(action, 'url_name', action.__name__) view.verbose_name = getattr(action, 'verbose_name', view.url_name.capitalize()) view.css_class = getattr(action, 'css_class', 'historylink') view.description = getattr(action, 'description', '') view.always_display = getattr(action, 'always_display', False) return view
def execute_operation_view(self, request, operation_id, node_id): self.operation_id = operation_id _execute_operation_view = action_to_view(execute_operation, self) return _execute_operation_view(request, node_id)