(cls, reply, app, user)
return cls.objects.create(**kwargs)
:type reply: wechatpy.replies.BaseReply
:type reply: wechatpy.replies.BaseReply
: type reply : wechatpy . replies . BaseReply
def from_reply(cls, reply, app, user):
        """:type reply: wechatpy.replies.BaseReply"""
        content = {
            key: getattr(reply, key)
            for key in reply._fields
            if key not in ("id", "source", "target", "create_time", "time")
        }

        kwargs = dict(
            app=app,
            user=user,
            type=reply.type,
            content=content,
            # raw=reply.render(),
            direct=cls.Direct.APP2USER
        )
        if reply.time:
            kwargs["created_at"] = timezone.datetime.fromtimestamp(
                reply.time)
        return cls.objects.create(**kwargs)
def from_reply ( cls , reply , app , user ) : content = { key : getattr ( reply , key ) for key in reply . _fields if key not in ( "id" , "source" , "target" , "create_time" , "time" ) } kwargs = dict ( app = app , user = user , type = reply . type , content = content , # raw=reply.render(), direct = cls . Direct . APP2USER ) if reply . time : kwargs [ "created_at" ] = timezone . datetime . fromtimestamp ( reply . time ) return cls . objects . create ( * * kwargs )