From b7ac601b8d316a816523f103be374cb84288d944 Mon Sep 17 00:00:00 2001
From: nishanth
Date: Tue, 2 Mar 2010 21:44:51 +0530
Subject: now there is also a notification sent to a new created user in
seed_db.
---
taskapp/management/commands/seed_db.py | 2 ++
taskapp/utilities/notification.py | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
(limited to 'taskapp')
diff --git a/taskapp/management/commands/seed_db.py b/taskapp/management/commands/seed_db.py
index ff808a9..398f774 100644
--- a/taskapp/management/commands/seed_db.py
+++ b/taskapp/management/commands/seed_db.py
@@ -8,6 +8,7 @@ from pytask.taskapp.events import task as taskEvents
from pytask.taskapp.events import user as userEvents
from pytask.taskapp.utilities.request import create_request
+from pytask.taskapp.utilities.notification import create_notification
def seed_db():
@@ -25,6 +26,7 @@ def seed_db():
dob = datetime.now()
gender = "M"
user = userEvents.createUser(username,email,password,dob,gender)
+ create_notification("NU", user)
if i%4==0:
create_request(defaultMentor, "MG", user)
diff --git a/taskapp/utilities/notification.py b/taskapp/utilities/notification.py
index b79d091..4c14976 100644
--- a/taskapp/utilities/notification.py
+++ b/taskapp/utilities/notification.py
@@ -118,10 +118,10 @@ def create_notification(role, sent_to, sent_from=None, reply=None, task=None, re
elif role == "NU":
- start_here_url = 'start here'
+ start_here_url = 'click here'
notification.sub = "Welcome %s"%sent_to.username
notification.message = "Welcome to PyTasks %s.
"%sent_to.username
- notification.message += "If you are lost and have no clue, %s"%start_here_url
+ notification.message += "%s to know more."%start_here_url
elif role in ["ND", "NG", "NA"]:
--
cgit