code: def register_view_for(cls, app, action, classview, attr):
          
          if 'view_for_endpoints' not in cls.__dict__:
              cls.view_for_endpoints = {}
          cls.view_for_endpoints.setdefault(app, {})[action] = (classview, attr)
docs: Register a classview and viewhandler for a given app and action