diff options
author | cedricbonhomme <devnull@localhost> | 2012-03-03 21:06:26 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2012-03-03 21:06:26 +0100 |
commit | a4678efc5cd96e57c462a57be02194916c9311cd (patch) | |
tree | 9d21d9acb825d48574f2704b64a9a6acfefb13e0 /mongodb.py | |
parent | Favorite page is now working with MongoDB. (diff) | |
download | newspipe-a4678efc5cd96e57c462a57be02194916c9311cd.tar.gz newspipe-a4678efc5cd96e57c462a57be02194916c9311cd.tar.bz2 newspipe-a4678efc5cd96e57c462a57be02194916c9311cd.zip |
Like/Unlike an article is now working with MongoDB.
Diffstat (limited to 'mongodb.py')
-rw-r--r-- | mongodb.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -122,7 +122,12 @@ class Articles(object): return unread_articles - + def like_article(self, like, feed_id, article_id): + """ + Like or unlike an article. + """ + collection = self.db[str(feed_id)] + collection.update({"article_id": article_id}, {"$set": {"article_like": like}}) def list_collections(self): """ |