(cls, menu, data, src=None)
return menu.app.message_handlers.create_handler(
            name="菜单[{0}]事件".format(data["name"]),
            src=cls.Source.MENU,
            rules=[Rule(
                type=Rule.Type.EVENTKEY,
                event=cls.EventType.CLICK,
                key=menu.content["key"]
            )],
            replies=[Reply.from_menu(menu, data, src)]
        )
:type menu: wechat_django.models.Menu
:type menu: wechat_django.models.Menu
: type menu : wechat_django . models . Menu
def from_menu(cls, menu, data, src=None):
        """
        :type menu: wechat_django.models.Menu
        """
        from . import Reply, Rule
        return menu.app.message_handlers.create_handler(
            name="菜单[{0}]事件".format(data["name"]),
            src=cls.Source.MENU,
            rules=[Rule(
                type=Rule.Type.EVENTKEY,
                event=cls.EventType.CLICK,
                key=menu.content["key"]
            )],
            replies=[Reply.from_menu(menu, data, src)]
        )
def from_menu ( cls , menu , data , src = None ) : from . import Reply , Rule return menu . app . message_handlers . create_handler ( name = "菜单[{0}]事件".format( d ata["n a me"] ) , src = cls . Source . MENU , rules = [ Rule ( type = Rule . Type . EVENTKEY , event = cls . EventType . CLICK , key = menu . content [ "key" ] ) ] , replies = [ Reply . from_menu ( menu , data , src ) ] )