added __unicode__ method to notification and removed useless comments in reply_to_request.
--- 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
--- 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)