summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornishanth2010-03-02 21:44:51 +0530
committernishanth2010-03-02 21:44:51 +0530
commitb7ac601b8d316a816523f103be374cb84288d944 (patch)
tree00c5552b6e8237ea190cb8522204c70963ce960c
parentfb62be5c7de51431e4cb65b50fc09b50782e4fc8 (diff)
downloadpytask-b7ac601b8d316a816523f103be374cb84288d944.tar.gz
pytask-b7ac601b8d316a816523f103be374cb84288d944.tar.bz2
pytask-b7ac601b8d316a816523f103be374cb84288d944.zip
now there is also a notification sent to a new created user in seed_db.
-rw-r--r--taskapp/management/commands/seed_db.py2
-rw-r--r--taskapp/utilities/notification.py4
2 files changed, 4 insertions, 2 deletions
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 = '<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"]: