code: def view_for(self, action='view'):
          
          app = current_app._get_current_object()
          view, attr = self.view_for_endpoints[app][action]
          return getattr(view(self), attr)
docs: Return the classview viewhandler that handles the specified action