# HG changeset patch # User nishanth # Date 1267349291 -19800 # Node ID 581ad20b8c3943d13607e96d77acecf54a916f0d # Parent 796ff9e279a8011ea0522dee902e7f6d1e14bb5b modified get_user method to give only count of unread requests. diff -r 796ff9e279a8 -r 581ad20b8c39 taskapp/utilities/notification.py --- 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.
"%(new_mentor_url, task_url) if remarks: notification.message += "Remarks: %s
"%remarks diff -r 796ff9e279a8 -r 581ad20b8c39 taskapp/utilities/user.py --- 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