summaryrefslogtreecommitdiff
path: root/taskapp/utilities
diff options
context:
space:
mode:
authornishanth2010-03-01 04:44:49 +0530
committernishanth2010-03-01 04:44:49 +0530
commit22f86093698c68207c89c57c42e10fa56d73935c (patch)
tree9c3223151a8fd415f15277748e01c27e3fb6b108 /taskapp/utilities
parent87428b64d3a02ce6bde8df83a0ffb115440ecaa7 (diff)
downloadpytask-22f86093698c68207c89c57c42e10fa56d73935c.tar.gz
pytask-22f86093698c68207c89c57c42e10fa56d73935c.tar.bz2
pytask-22f86093698c68207c89c57c42e10fa56d73935c.zip
finalised the view_task page.
Diffstat (limited to 'taskapp/utilities')
-rw-r--r--taskapp/utilities/notification.py12
1 files changed, 12 insertions, 0 deletions
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= '<a href="/task/view/tid=%s">%s</a>'%(task.id, task.title)
requested_mentor_url = '<a href="/user/view/uid=%s">%s</a>'%(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 = '<a href="/user/view/uid=%s">%s</a>'%(accepting_user.id, accepting_user.username) ## i mean the user who has accepted it
requested_by_url = '<a href="/user/view/uid=%s">%s</a>'%(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 = '<sup><a href="/about/mentor">learn more</a></sup>'
task_url= '<a href="/task/view/tid=%s">%s</a>'%(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 = '<a href="/user/view/uid=%s">%s</a>'%(mentor.id, mentor.username)
task_url= '<a href="/task/view/tid=%s">%s</a>'%(task.id, task.title)