aboutsummaryrefslogtreecommitdiff
path: root/bh20simplewebuploader
diff options
context:
space:
mode:
authorBonfaceKilz2021-01-05 19:54:01 +0300
committerBonfaceKilz2021-01-05 19:54:59 +0300
commitaa4b80f9dd8fbbcc2c7fb7f4869dc142fcf61ceb (patch)
tree8bf0ec8cc92744a70796a6bac3e22228b64e3b01 /bh20simplewebuploader
parentf7666a7766c8138aa690340fc68cb67f709327f3 (diff)
downloadbh20-seq-resource-aa4b80f9dd8fbbcc2c7fb7f4869dc142fcf61ceb.tar.gz
bh20-seq-resource-aa4b80f9dd8fbbcc2c7fb7f4869dc142fcf61ceb.tar.lz
bh20-seq-resource-aa4b80f9dd8fbbcc2c7fb7f4869dc142fcf61ceb.zip
Pass extra param that contains all news items to the template
* bh20simplewebuploader/main.py (send_home): Add extra all_items when rendering the template.
Diffstat (limited to 'bh20simplewebuploader')
-rw-r--r--bh20simplewebuploader/main.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py
index 0c58712..504f03c 100644
--- a/bh20simplewebuploader/main.py
+++ b/bh20simplewebuploader/main.py
@@ -273,12 +273,23 @@ def send_home():
"""
Send the front page.
"""
+ (tweets,
+ commits,
+ pubmed_articles,
+ arxiv_articles) = [get_feed_items(x) for x in ["bh20-tweet-score:",
+ "bh20-commit-score:",
+ "bh20-pubmed-score:",
+ "bh20-arxiv-score:"]]
return render_template(
'home.html', menu='HOME',
- tweets=get_feed_items("bh20-tweet-score:"),
- commits=get_feed_items("bh20-commit-score:"),
- pubmed_articles=get_feed_items("bh20-pubmed-score:"),
- arxiv_articles=get_feed_items("bh20-arxiv-score:"),
+ all_items=list(itertools.chain(tweets,
+ commits,
+ pubmed_articles,
+ arxiv_articles)),
+ tweets=tweets,
+ commits=commits,
+ pubmed_articles=pubmed_articles,
+ arxiv_articles=arxiv_articles,
load_map=True)