diff options
author | cedricbonhomme <devnull@localhost> | 2012-03-05 18:30:46 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2012-03-05 18:30:46 +0100 |
commit | c3d0ec7556008a404b9e64fc63b402751d6e0956 (patch) | |
tree | 4ebee2dff53f53c89d94caf9e0f7312a4baf7713 | |
parent | Added UTF-8 support in CherryPy configuration file (diff) | |
download | newspipe-c3d0ec7556008a404b9e64fc63b402751d6e0956.tar.gz newspipe-c3d0ec7556008a404b9e64fc63b402751d6e0956.tar.bz2 newspipe-c3d0ec7556008a404b9e64fc63b402751d6e0956.zip |
Case insensitive sorting of collections by dict id.
-rw-r--r-- | mongodb.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -90,7 +90,7 @@ class Articles(object): cursor = self.db[collection_name].find({"type":0, condition[0]:condition[1]}) if cursor.count() != 0: feeds.append(cursor.next()) - feeds = sorted(feeds, key=itemgetter('feed_title')) + feeds.sort(key = lambda elem: elem['feed_title'].lower()) return feeds def get_articles_from_collection(self, feed_id, condition=None): |