# HG changeset patch # User nishanth # Date 1266989651 -19800 # Node ID e743fe1f0f998b6b5641b45229e6667b0b2be88c # Parent 1fc027bf99ee5a2aee5237a9554ddd8f4e24f0e3 updated view task in views to suit the new design . diff -r 1fc027bf99ee -r e743fe1f0f99 taskapp/views/task.py --- a/taskapp/views/task.py Wed Feb 24 10:42:46 2010 +0530 +++ b/taskapp/views/task.py Wed Feb 24 11:04:11 2010 +0530 @@ -38,7 +38,7 @@ is_guest = True if not user.is_authenticated() else False is_mentor = True if user in task.mentors.all() else False - task_claimable = True if task.status in ["OP", "RE"] else False + task_claimable = True if task.status in ["OP", "WR"] else False context = {'user':user, 'task':task, @@ -49,9 +49,10 @@ 'errors':errors, } - if task.status == "AS": - context['assigned_user'] = task.assigned_users.all()[0] - + assigned_users = task.assigned_users.all() + if assigned_users: + context['assigned_users'] = assigned_users + if request.method == 'POST': if not is_guest: data = request.POST["data"] diff -r 1fc027bf99ee -r e743fe1f0f99 templates/task/view.html --- a/templates/task/view.html Wed Feb 24 10:42:46 2010 +0530 +++ b/templates/task/view.html Wed Feb 24 11:04:11 2010 +0530 @@ -20,8 +20,12 @@
{{ task.desc }}

status of task is {{task.status}}
- {% if assigned_user %} - Task has been assigned to {{assigned_user.username}}
+ {% if assigned_users %} + Users working on this task: + {% for user in assigned_users %} + {{user.username}}| + {% endfor %} +
{% endif %} {% if not is_guest %} View claims