Amchii
Amchii
由于代码是在学习本章时从头开始写的,所以没有fork,部分代码排版也不相同,为了不影响albumy本来的排版,所以放在issue中,希望能帮助看到的人和作者。 https://github.com/amchii/FlaskAlbumy README.md: 来自于李辉的Flask书上的示例程序:[Albumy](https://github.com/greyli/albumy) , 个人意见向地改进了少许代码,修复了一些已知bug : 1. [新评论未进行`photo.can_comment`验证的bug](https://github.com/greyli/albumy/issues/24) [`if not photo.can_comment`](https://github.com/amchii/FlaskAlbumy/blob/5aae074617bf96a7ab7c7febc9b07e057530bfda/albumy/blueprints/main.py#L283) 2. [收藏关注时登陆后的跳转问题](https://github.com/greyli/albumy/issues/22) [`if request.method.lower() == 'get':`](https://github.com/amchii/FlaskAlbumy/blob/5aae074617bf96a7ab7c7febc9b07e057530bfda/albumy/blueprints/main.py#L335) 3. [鼠标在头像上悬浮的时候出现的用户信息不能即时更新](https://github.com/greyli/albumy/issues/16) [`$el.popover('dispose');`](https://github.com/amchii/FlaskAlbumy/blob/5aae074617bf96a7ab7c7febc9b07e057530bfda/albumy/static/js/script.js#L75) 4. [关注页分页的bug](https://github.com/greyli/albumy/issues/25) [`pagination = user.following.filter(Follow.followed_id != user.id).paginate(page=page, per_page=per_page)`](https://github.com/amchii/FlaskAlbumy/blob/4fe090fc04b1e40120d85105f919a910f4fd386b/albumy/blueprints/user.py#L96) 5....
https://github.com/greyli/albumy/blob/943829b819b7bda6921d6c0fe277c75cd6a98033/albumy/blueprints/main.py#L261 虽然说当photo.can_comment为False时不会渲染评论表单,但是完全可以获得一个csrf_token然后按照格式post,在网站demo中测试成功。 http://albumy.helloflask.com/photo/636?page=1 其中内容为2的评论就是我在comment disabled下提交的。
关注页分页bug
https://github.com/greyli/albumy/blob/943829b819b7bda6921d6c0fe277c75cd6a98033/albumy/templates/user/followers.html#L11 程序设置每页展示20用户,当关注数为21时第2页的follows|length为1,却被这个if给过滤掉了。 还有用户初始化时会首先关注自己,当获取第一页关注用户时 https://github.com/greyli/albumy/blob/943829b819b7bda6921d6c0fe277c75cd6a98033/albumy/blueprints/user.py#L85 会同时获取到自己,然后被 https://github.com/greyli/albumy/blob/943829b819b7bda6921d6c0fe277c75cd6a98033/albumy/templates/user/followers.html#L13 这条语句过滤掉,这就导致第一页会只显示19个用户
- Sequel Ace Version (including build number):Version 3.4.0 Build 3038 - Sequel Ace Source (App Store/GitHub/Homebrew):GitHub - macOS Version:10.15.6 - Processor Type (Intel/Apple):Intel - MySQL Version:5.7.32 - macOS Localization:zh_CN **Is...
I tried compiling the TDLib mentioned in the readme, but after successfully compiling it, running the demo threw a Pydantic validation error. Two of the validation errors was: ``` ERROR:Client:Unable...
Uvicorn provides a worker to be used together with gunicorn: > [Gunicorn](https://gunicorn.org/) is a mature, fully featured server and process manager. > > Uvicorn includes a Gunicorn worker class allowing...
 如图示,设置快捷键为cmd+F10,暂停时计时停止,但⏸标志没有变化为▶️。