def register_view(self, key_dict, view,
                      render=render_view,
                      template=None,
                      permission=None,
                      internal=False):
        """Register a view.

        :param key_dict: a dict containing view registration info,
          for instance model, request_method, etc.
        :param view: the view function as registered.
        :param render_view: the render function to use to turn the view
          function result value into a response. By default the content
          is interpreted as a string body.
        :param template: the template used to render the view function
          result value into a response. By default there is no template.
        :param permission: the permission class used to check whether the
          identity is permitted to use the view on the model instance.
        :param internal: whether this view is internal or not.
        """
        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