now there is also a notification sent to a new created user in seed_db.
authornishanth
Tue, 02 Mar 2010 21:44:51 +0530
changeset 183 c088c79a225c
parent 182 1b4253350a3c
child 184 8ca20bacc78e
now there is also a notification sent to a new created user in seed_db.
taskapp/management/commands/seed_db.py
taskapp/utilities/notification.py
--- a/taskapp/management/commands/seed_db.py	Tue Mar 02 17:12:47 2010 +0530
+++ b/taskapp/management/commands/seed_db.py	Tue Mar 02 21:44:51 2010 +0530
@@ -8,6 +8,7 @@
 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 @@
         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)
--- a/taskapp/utilities/notification.py	Tue Mar 02 17:12:47 2010 +0530
+++ b/taskapp/utilities/notification.py	Tue Mar 02 21:44:51 2010 +0530
@@ -118,10 +118,10 @@
 
     elif role == "NU":
 
-        start_here_url = '<a href="/about/starthere/" taget="_blank">start here</a>'
+        start_here_url = '<a href="/about/starthere/" taget="_blank">click here</a>'
         notification.sub = "Welcome %s"%sent_to.username
         notification.message = "Welcome to PyTasks %s.<br />"%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"]: