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
评论列表
文章目录