diff options
-rw-r--r-- | mongodb.py | 5 | ||||
-rwxr-xr-x | pyAggr3g470r.py | 2 | ||||
-rwxr-xr-x | utils.py | 2 |
3 files changed, 3 insertions, 6 deletions
@@ -37,7 +37,7 @@ class Articles(object): """ collection = self.db[str(feed_id)] - collection.create_index([("article_link", pymongo.ASCENDING), ("article_date", pymongo.DESCENDING)], \ + collection.create_index([("article_date", pymongo.DESCENDING)], \ {"unique":False, "sparse":False}) for article in articles: @@ -105,8 +105,7 @@ class Articles(object): cursor = collection.find({"type":1}) else: cursor = collection.find({"type":1, condition[0]:condition[1]}) - #return cursor.sort([("article_date", pymongo.DESCENDING)]) - return cursor + return cursor.sort([("article_date", pymongo.DESCENDING)]) def print_articles_from_collection(self, collection_id): """ diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index cd01817c..ea708d18 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -1001,7 +1001,7 @@ class Root: html += "<h1>You are receiving e-mails for the following feeds:</h1>\n" for feed in feeds: html += """\t<a href="/articles/%s">%s</a> - <a href="/mail_notification/0:%s">Stop</a><br />\n""" % \ - (feed["feed_id"], feed.feed_title, feed.feed_id) + (feed["feed_id"], feed["feed_title"], feed["feed_id"]) else: html += "<p>No active notifications.<p>\n" html += """<p>Notifications are sent to: <a href="mail:%s">%s</a></p>""" % \ @@ -43,8 +43,6 @@ import calendar import unicodedata import htmlentitydefs -import articles - import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText |