models.py 文件源码

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

项目:markbj 作者: chaijunit 项目源码 文件源码
def _50px_avatar(self):
        """ 50*50????? """
        image_path = "/".join(current_app.config["AVATAR_IMAGE_PATH"].split("/")[1:])
        filename =  "/".join([image_path, "50_50_{0}".format(self.avatar)])
        real_file = "/".join([current_app.root_path, filename])
        if not os.path.exists(real_file):
            return self.thumbnail_avatar()
        return filename
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号