aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-10-13 13:26:26 +0200
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-10-13 13:26:26 +0200
commit4d533ef45c579c9eb2df6d5163a99d81e39edd42 (patch)
tree4d18e038c617bdad71b1af0ea83cbedb1acf3df4 /pyaggr3g470r
parentMongoEngine list slicing. (diff)
downloadnewspipe-4d533ef45c579c9eb2df6d5163a99d81e39edd42.tar.gz
newspipe-4d533ef45c579c9eb2df6d5163a99d81e39edd42.tar.bz2
newspipe-4d533ef45c579c9eb2df6d5163a99d81e39edd42.zip
MongoEngine list slicing.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/templates/layout.html2
-rw-r--r--pyaggr3g470r/views.py7
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
bgstack15