def render_(cls, data={}, template_=None, layout_=None, **kwargs):
        """
        To render data to the associate template file of the action view
        :param data: The context data to pass to the template
        :param template_: The file template to use. By default it will map the classname/action.html
        :param layout_: The body layout, must contain {% include __template__ %}
        """
        if not template_:
            stack = inspect.stack()[1]
            module = inspect.getmodule(cls).__name__
            module_name = module.split(".")[-1]
            action_name = stack[3]      # The method being called in the class
            view_name = cls.__name__    # The name of the class without View

            if view_name.endswith("View"):
                view_name = view_name[:-4]
            template_ = "%s/%s.html" % (view_name, action_name)

        data = data or dict()
        if kwargs:
            data.update(kwargs)
        data["__"] = cls._global
        data["__template__"] = template_

        return render_template(layout_ or cls.base_layout, **data)
def render_ ( cls , data = { } , template_ = None , layout_ = None , ** kwargs ) : if not template_ : stack = inspect . stack ( ) [ 1 ] module = inspect . getmodule ( cls ) . __name__ module_name = module . split ( "." ) [ - 1 ] action_name = stack [ 3 ] view_name = cls . __name__ if view_name . endswith ( "View" ) : view_name = view_name [ : - 4 ] template_ = "%s/%s.html" % ( view_name , action_name ) data = data or dict ( ) if kwargs : data . update ( kwargs ) data [ "__" ] = cls . _global data [ "__template__" ] = template_ return render_template ( layout_ or cls . base_layout , ** data )
To render data to the associate template file of the action view
        :param data: The context data to pass to the template
        :param template_: The file template to use. By default it will map the classname/action.html
        :param layout_: The body layout, must contain {% include __template__ %}