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

Cao zihao 201831990221 pick most popular articles #50

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

spm2020spring
Copy link
Member

By 朱倩, 曹子昊, 费宇馨, 李婷

Recommend five articles with high popularity on the homepage.We added the homepage into two parts. Articles in the first part are top 5 in popularity, and this part will update according to the popularity of each article and how long the article has been shown on it Articles in the second part are all the articles posted before,sorted by release time from newest to oldest.
io.html中用jinja做了个for循环输出article.title,所以需要在def index():中声明调用的字典,以metric为参考列用query.order_by进行降序排序后取前五位作为top5
用jinja写一个for循环动态输出articles里的top5
service.py Outdated Show resolved Hide resolved
service.py Outdated Show resolved Hide resolved
templates/io.html Outdated Show resolved Hide resolved
delete the useless 'render'
assist the jinja frame in io.html working well
change the address in line 159 to relative
Changed the color style to cleaner
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

Successfully merging this pull request may close these issues.

2 participants