diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-10-13 13:26:26 +0200 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-10-13 13:26:26 +0200 |
commit | 4d533ef45c579c9eb2df6d5163a99d81e39edd42 (patch) | |
tree | 4d18e038c617bdad71b1af0ea83cbedb1acf3df4 | |
parent | MongoEngine list slicing. (diff) | |
download | newspipe-4d533ef45c579c9eb2df6d5163a99d81e39edd42.tar.gz newspipe-4d533ef45c579c9eb2df6d5163a99d81e39edd42.tar.bz2 newspipe-4d533ef45c579c9eb2df6d5163a99d81e39edd42.zip |
MongoEngine list slicing.
-rw-r--r-- | pyaggr3g470r/templates/layout.html | 2 | ||||
-rw-r--r-- | pyaggr3g470r/views.py | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html index 9a194453..e0005115 100644 --- a/pyaggr3g470r/templates/layout.html +++ b/pyaggr3g470r/templates/layout.html @@ -41,7 +41,7 @@ <li><a href="/fetch">Fetch</a></li> <li><a href="#services">Management</a></li> <li><a href="#services">History</a></li> - <li><a href="#services">Favorites</a></li> + <li><a href="/favorites/">Favorites</a></li> <li><a href="#services">Unread</a></li> <li><a href="/about/">About</a></li> </ul> diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index 27b1ab59..642609c9 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -49,4 +49,9 @@ def article(article_id=None): @app.route('/articles/<feed_id>', methods=['GET']) def articles(feed_id=None): feed = models.Feed.objects(id=feed_id).first() - return render_template('articles.html', feed=feed)
\ No newline at end of file + return render_template('articles.html', feed=feed) + +@app.route('/favorites/', methods=['GET']) +def favorites(): + feed = models.Feed.objects().fields(articles.like=True) + return render_template('favorites.html', feed=feed)
\ No newline at end of file |