aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-04-12 14:41:28 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-04-12 14:41:28 +0200
commitf9037d73297dc8d5ca862ae674075cb7580be4a4 (patch)
treea882749ba2ab5090188bc2ab5987aec81eb57eb1 /pyaggr3g470r
parentmaking the favorites link switch to home when the displayed page is favorites (diff)
downloadnewspipe-f9037d73297dc8d5ca862ae674075cb7580be4a4.tar.gz
newspipe-f9037d73297dc8d5ca862ae674075cb7580be4a4.tar.bz2
newspipe-f9037d73297dc8d5ca862ae674075cb7580be4a4.zip
improving look and feel of home page
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/views/views.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py
index 4e610d63..e06e1a9d 100644
--- a/pyaggr3g470r/views/views.py
+++ b/pyaggr3g470r/views/views.py
@@ -249,6 +249,9 @@ def home(favorites=False):
filters['readed'] = filter_ == 'read'
if feed_id:
filters['feed_id'] = feed_id
+ if head_title:
+ head_title += ' - '
+ head_title += feed_contr.get(id=feed_id).title
articles = arti_contr.read(**filters).order_by(Article.date.desc())
if limit != 'all':
@@ -256,7 +259,8 @@ def home(favorites=False):
articles = articles.limit(limit)
def gen_url(filter_=filter_, limit=limit, feed=feed_id):
- return url_for('home', filter_=filter_, limit=limit, feed=feed)
+ return url_for('favorites' if favorites else 'home',
+ filter_=filter_, limit=limit, feed=feed)
articles = list(articles)
if not articles and not favorites and feed_id:
bgstack15