def module_name ( self ) : if not self . view_func : return None elif self . _controller_cls : rv = inspect . getmodule ( self . _controller_cls ) . __name__ return rv return inspect . getmodule ( self . view_func ) . __name__
python 3 get name of calling routing
The module where this route s view function was defined .
def module_name(self):
        """
        The module where this route's view function was defined.
        """
        if not self.view_func:
            return None
        elif self._controller_cls:
            rv = inspect.getmodule(self._controller_cls).__name__
            return rv
        return inspect.getmodule(self.view_func).__name__