modified get_user method to give only count of unread requests.
--- a/taskapp/utilities/notification.py Sun Feb 28 14:44:10 2010 +0530
+++ b/taskapp/utilities/notification.py Sun Feb 28 14:58:11 2010 +0530
@@ -63,7 +63,7 @@
notification.message += "He can be contacted on %s"%new_mentor.email
else:
- notification.sub = "Rejected request to act as a mentor for %s"%task.title[:20]
+ notification.sub = "%s rejected request to act as a mentor"%new_mentor.username
notification.message = "%s has rejected your request asking him to act as a mentor for %s.<br />"%(new_mentor_url, task_url)
if remarks:
notification.message += "Remarks: %s<br />"%remarks
--- a/taskapp/utilities/user.py Sun Feb 28 14:44:10 2010 +0530
+++ b/taskapp/utilities/user.py Sun Feb 28 14:58:11 2010 +0530
@@ -7,7 +7,7 @@
"""
unread_notifications = user.notification_sent_to.filter(is_read=False,is_deleted=False)
- unread_requests = user.request_sent_to.filter(is_valid=True,is_replied=False)
+ unread_requests = user.request_sent_to.filter(is_valid=True,is_replied=False,is_read=False)
user.unread_notifications = unread_notifications
user.unread_requests = unread_requests