taskapp/utilities/notification.py
changeset 150 604808d27483
parent 147 8c1ed28d04d2
child 153 925af1b4ee65
equal deleted inserted replaced
149:3395960549e8 150:604808d27483
    96         notification.message = "You have accepted to act as a mentor%s for the task %s.<br />"%(mentor_learn_url, task_url)
    96         notification.message = "You have accepted to act as a mentor%s for the task %s.<br />"%(mentor_learn_url, task_url)
    97         notification.message += " Here is a list of other mentors and their email addresses.<br /> <ul>"
    97         notification.message += " Here is a list of other mentors and their email addresses.<br /> <ul>"
    98 
    98 
    99         for a_mentor in task.mentors.exclude(id=new_mentor.id):
    99         for a_mentor in task.mentors.exclude(id=new_mentor.id):
   100             notification.message += "<li> %s - %s </li>"%(a_mentor.username, a_mentor.email)
   100             notification.message += "<li> %s - %s </li>"%(a_mentor.username, a_mentor.email)
   101         notification.message += "</ul> List of users working on the task.<br />"
   101         notification.message += "</ul>"
   102 
   102 
   103         working_users = task.assigned_users.all()
   103         working_users = task.assigned_users.all()
   104         if working_users:
   104         if working_users:
       
   105             notification_message += "List of users working on the task.<br />"
   105             notification_message += "<ul>"
   106             notification_message += "<ul>"
   106             for a_user in working_users:
   107             for a_user in working_users:
   107                 notification.message += "<li> %s - %s </li>"%(a_user.username, a_user.email)
   108                 notification.message += "<li> %s - %s </li>"%(a_user.username, a_user.email)
   108             notification.message += "</ul><br />"
   109             notification.message += "</ul><br />"
   109         notification.message += "Happy Mentoring."
   110         notification.message += "Happy Mentoring."