diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-03 00:42:41 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-03 00:42:41 +0100 |
commit | a04baa348bac450ae28e11bb1fce04374f3838ec (patch) | |
tree | b84613bba03d2450698feb3e9b6ff38b3691eb96 /pyaggr3g470r | |
parent | Removed Flask-Principal dependency from the requirements.txt file. (diff) | |
download | newspipe-a04baa348bac450ae28e11bb1fce04374f3838ec.tar.gz newspipe-a04baa348bac450ae28e11bb1fce04374f3838ec.tar.bz2 newspipe-a04baa348bac450ae28e11bb1fce04374f3838ec.zip |
feeds are compared with their ids
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r-- | pyaggr3g470r/models.py | 3 | ||||
-rw-r--r-- | pyaggr3g470r/views.py | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/pyaggr3g470r/models.py b/pyaggr3g470r/models.py index 2c94e960..90801edc 100644 --- a/pyaggr3g470r/models.py +++ b/pyaggr3g470r/models.py @@ -44,8 +44,7 @@ class Feed(EmbeddedDocument): } def __eq__(self, other): - return self.title == other.title - + return self.oid == other.oid def __str__(self): return 'Feed: %s' % self.title diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index f93f276f..c390ddc0 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -147,8 +147,7 @@ def articles(feed_id=None): user = models.User.objects(email=g.user.email, feeds__oid=feed_id).first() for feed in user.feeds: if str(feed.oid) == feed_id: - #feed.articles = sorted(feed.articles, key=lambda t: t.date, reverse=True) - return render_template('articles.html', feed=feed) + return render_template('articles.html', feed=user.feeds[0]) @app.route('/favorites/', methods=['GET']) @login_required |