Ejemplo n.º 1
0
    def get(self, *args, **kwargs):
        tmp_wechat = Wechat()
        OBJ_MAP[tmp_wechat.uuid] = tmp_wechat

        self.set_secure_cookie('uid', tmp_wechat.uuid)
        self.write(tmp_wechat.showQRImage())
        self.finish()
Ejemplo n.º 2
0
    def get(self, *args, **kwargs):
        uid = self.get_current_user()
        if not uid or uid not in OBJ_MAP:
            tmp_wechat = Wechat()
            OBJ_MAP[tmp_wechat.uuid] = tmp_wechat
            uid = tmp_wechat.uuid

        tmp_wechat = OBJ_MAP[uid]
        self.set_secure_cookie('uid', tmp_wechat.uuid)
        self.write(tmp_wechat.showQRImage())
        self.finish()