albumy icon indicating copy to clipboard operation
albumy copied to clipboard

修复已知bug和部分个人向的改进

Open amchii opened this issue 5 years ago • 1 comments

由于代码是在学习本章时从头开始写的,所以没有fork,部分代码排版也不相同,为了不影响albumy本来的排版,所以放在issue中,希望能帮助看到的人和作者。 https://github.com/amchii/FlaskAlbumy README.md:

来自于李辉的Flask书上的示例程序:Albumy , 个人意见向地改进了少许代码,修复了一些已知bug :

  1. 新评论未进行photo.can_comment验证的bug

    if not photo.can_comment

  2. 收藏关注时登陆后的跳转问题

    if request.method.lower() == 'get':

  3. 鼠标在头像上悬浮的时候出现的用户信息不能即时更新

    $el.popover('dispose');

  4. 关注页分页的bug

    pagination = user.following.filter(Follow.followed_id != user.id).paginate(page=page, per_page=per_page)

  5. 评论区评论时间的tooltip显示当前时间的bug

    ​ 给tooltip的title传递函数可以正常显示,和Bluelog相同。

  6. 更换头像时若上传图片后不更新头像,则user.avatar_raw会被取代

    ​ 这个通过给User新建一个avatar_raw_temp字段,用于保存上传头像原图时的文件名。在 change_avatar.html 和更换头像的视图函数中通过has_temp参数进行判断

amchii avatar Jul 12 '19 11:07 amchii

非常感谢!我有时间会一一确认,然后更新对应的代码。

greyli avatar Jul 13 '19 08:07 greyli