

def register_view(self, key_dict, view, render=render_view, template=None, permission=None, internal=False):
    'Register a view.\n\n        :param key_dict: a dict containing view registration info,\n          for instance model, request_method, etc.\n        :param view: the view function as registered.\n        :param render_view: the render function to use to turn the view\n          function result value into a response. By default the content\n          is interpreted as a string body.\n        :param template: the template used to render the view function\n          result value into a response. By default there is no template.\n        :param permission: the permission class used to check whether the\n          identity is permitted to use the view on the model instance.\n        :param internal: whether this view is internal or not.\n        '
    if (template is not None):
        render = self.template_engine_registry.get_template_render(template, render)
    v = View(view, render, permission, internal)
    self.reg_registry.register_function(generic.view, v, **key_dict)

dataset/ETHPy150Open morepath/morepath/morepath/view.py ViewRegistry.register_view/original