(self, rules=None, replies=None, **kwargs)
return handler
:rtype: wechat_django.models.MessageHandler
:rtype: wechat_django.models.MessageHandler
: rtype : wechat_django . models . MessageHandler
def create_handler(self, rules=None, replies=None, **kwargs):
        """:rtype: wechat_django.models.MessageHandler"""
        handler = self.create(**kwargs)
        if rules:
            for rule in rules:
                rule.handler = handler
            handler.rules.bulk_create(rules)
        if replies:
            for reply in replies:
                reply.handler = handler
            handler.replies.bulk_create(replies)
        return handler
def create_handler ( self , rules = None , replies = None , * * kwargs ) : handler = self . create ( * * kwargs ) if rules : for rule in rules : rule . handler = handler handler . rules . bulk_create ( rules ) if replies : for reply in replies : reply . handler = handler handler . replies . bulk_create ( replies ) return handler