member.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:v2ex-tornado-2 作者: coderyy 项目源码 文件源码
def get(self, key):
        go = '/'
        member = CheckAuth(self)
        if member:
            member = Member.get(member.id)
            one = Member.get(key)
            if one:
                if one.num != member.num:
                    try:
                        blocked = pickle.loads(member.blocked.encode('utf-8'))
                    except:
                        blocked = []
                    if len(blocked) == 0:
                        blocked = []
                    if one.num not in blocked:
                        blocked.append(one.num)
                    member.blocked = pickle.dumps(blocked)
                    member.sync()
                    store.commit()  #jon add
                    memcache.set('Member_' + str(member.num), member, 86400)
        self.redirect(go)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号