api_views.py 文件源码

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

项目:optf2 作者: Lagg 项目源码 文件源码
def GET(self, uid):
        user = {}
        callback = web.input().get("jsonp")

        try:
            user = models.user(uid).load()
            # JS is bad at numbers
            user["id64"] = str(user["id64"])
        except: pass

        web.header("Content-Type", jsonMimeType)

        jsonobj = json.dumps(user)
        if not callback:
            return jsonobj
        else:
            return callback + '(' + jsonobj + ');'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号