aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mongodb.py5
-rwxr-xr-xpyAggr3g470r.py2
-rwxr-xr-xutils.py2
3 files changed, 3 insertions, 6 deletions
diff --git a/mongodb.py b/mongodb.py
index a37b80c0..d00b453e 100644
--- a/mongodb.py
+++ b/mongodb.py
@@ -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>""" % \
diff --git a/utils.py b/utils.py
index 8a19ea75..c23b8794 100755
--- a/utils.py
+++ b/utils.py
@@ -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
bgstack15