Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
amchii opened this issue Jul 12, 2019 · 1 comment
Open

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

amchii opened this issue Jul 12, 2019 · 1 comment

Comments

@amchii
Copy link

amchii commented Jul 12, 2019

由于代码是在学习本章时从头开始写的,所以没有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参数进行判断

@greyli
Copy link
Owner

greyli commented Jul 13, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants