aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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