diff options
author | nishanth | 2010-02-28 13:27:43 +0530 |
---|---|---|
committer | nishanth | 2010-02-28 13:27:43 +0530 |
commit | 33857f7042c0e72b29a8963b2ee3fe3c9696197b (patch) | |
tree | a999faf07d4a3e0c01d896348f7c4a23325d3da4 /taskapp | |
parent | 42c60f17e97c0712891f1a9b016e9ccb15e1cba7 (diff) | |
download | pytask-33857f7042c0e72b29a8963b2ee3fe3c9696197b.tar.gz pytask-33857f7042c0e72b29a8963b2ee3fe3c9696197b.tar.bz2 pytask-33857f7042c0e72b29a8963b2ee3fe3c9696197b.zip |
fixed the a_or_an bug .
Diffstat (limited to 'taskapp')
-rw-r--r-- | taskapp/utilities/notification.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/taskapp/utilities/notification.py b/taskapp/utilities/notification.py index f95349d..f9017a7 100644 --- a/taskapp/utilities/notification.py +++ b/taskapp/utilities/notification.py @@ -75,10 +75,11 @@ def create_notification(role, sent_to, sent_from=None, reply=None, task=None, re requested_by_url = '<a href="/user/view/uid=%s">%s</a>'%(requested_by.id, requested_by.username) role_rights = dict(RIGHTS_CHOICES)[role] role_learn_url = "/about/%s"%role_rights.lower() + a_or_an = "an" if role_rights == "AD" else "a" if reply: notification.sub = "New %s for the site"%role_rights - notification.message = "%s has accepted request made by %s asking him to act as a %s for the website.<br />"%(user_url, requested_by_url, role_rights) + notification.message = "%s has accepted request made by %s asking him to act as %s %s for the website.<br />"%(user_url, requested_by_url, a_or_an, role_rights) else: notification.sub = "Rejected your request to act as %s"%role_rights notification.message = "%s has rejected your request asking him to act as a %s.<br />"%(new_mentor_url, task_url) |