# HG changeset patch # User nishanth # Date 1267261681 -19800 # Node ID 9417ae986d2abbd7efa45b466fc2e88d42f87d93 # Parent e747da8bc110b0596ce4ed1d4fc6e7841a047a63 added __unicode__ method to notification and removed useless comments in reply_to_request. diff -r e747da8bc110 -r 9417ae986d2a taskapp/events/request.py --- a/taskapp/events/request.py Sat Feb 27 14:22:26 2010 +0530 +++ b/taskapp/events/request.py Sat Feb 27 14:38:01 2010 +0530 @@ -27,12 +27,9 @@ for a_mentor in task.mentors.all(): if reply: addCredits(task, request_obj.sent_by, request_obj.receiving_user, pynts) - print "send yes notifications appropriately" - #def create_notification(role, sent_to, sent_from=None, reply=None, task=None, remark=None, receiving_user=None, pynts=None, requested_by): - create_notification("PY", a_mentor, replied_by, True, task, receiving_user, pynts, requested_by) + create_notification(request_obj.role, a_mentor, replied_by, True, task, receiving_user, pynts, requested_by) else: - print "send a no notificvaton" - create_notification("PY", a_mentor, replied_by, False, task, receiving_user, pynts, requested_by, request_obj.remarks) + create_notification(request_obj.role, a_mentor, replied_by, False, task, receiving_user, pynts, requested_by, request_obj.remarks) elif request_obj.role == "MT": ## add him as a mentor to the task diff -r e747da8bc110 -r 9417ae986d2a taskapp/models.py --- a/taskapp/models.py Sat Feb 27 14:22:26 2010 +0530 +++ b/taskapp/models.py Sat Feb 27 14:38:01 2010 +0530 @@ -183,6 +183,9 @@ sent_date = models.DateTimeField() is_read = models.BooleanField(default = False) is_deleted = models.BooleanField(default = False) + + def __unicode__(self): + return u"%s %s"%(self.sent_to, self.sent_date.ctime()) tagging.register(Profile) tagging.register(Task)