From 22f86093698c68207c89c57c42e10fa56d73935c Mon Sep 17 00:00:00 2001
From: nishanth
Date: Mon, 1 Mar 2010 04:44:49 +0530
Subject: finalised the view_task page.
---
taskapp/utilities/notification.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
(limited to 'taskapp/utilities')
diff --git a/taskapp/utilities/notification.py b/taskapp/utilities/notification.py
index 75c35db..16e80a1 100644
--- a/taskapp/utilities/notification.py
+++ b/taskapp/utilities/notification.py
@@ -52,6 +52,9 @@ def create_notification(role, sent_to, sent_from=None, reply=None, task=None, re
elif role == "MT":
+ notification.task = task
+ notification.sent_from = sent_from
+
task_url= '%s'%(task.id, task.title)
requested_mentor_url = '%s'%(requested_by.id, requested_by.username)
new_mentor = sent_from
@@ -70,6 +73,8 @@ def create_notification(role, sent_to, sent_from=None, reply=None, task=None, re
elif role in ["DV", "MG", "AD"]:
+ notification.sent_from = sent_from
+
accepting_user = sent_from
user_url = '%s'%(accepting_user.id, accepting_user.username) ## i mean the user who has accepted it
requested_by_url = '%s'%(requested_by.id, requested_by.username)
@@ -88,6 +93,7 @@ def create_notification(role, sent_to, sent_from=None, reply=None, task=None, re
elif role == "NT":
+ notification.task = task
new_mentor = sent_to
mentor_learn_url = 'learn more'
task_url= '%s'%(task.id, task.title)
@@ -110,6 +116,12 @@ def create_notification(role, sent_to, sent_from=None, reply=None, task=None, re
notification.message += "Happy Mentoring."
elif role in ["CM", "CD"]:
+
+ notification.sent_from = sent_from
+ notification.role = role
+ notification.task = task
+ notification.remarks = remarks
+
mentor = sent_from
mentor_url = '%s'%(mentor.id, mentor.username)
task_url= '%s'%(task.id, task.title)
--
cgit