summaryrefslogtreecommitdiff
path: root/taskapp/views
diff options
context:
space:
mode:
authornishanth2010-02-24 11:04:11 +0530
committernishanth2010-02-24 11:04:11 +0530
commitf98d30aa38f712f672947c6920920625e4c391eb (patch)
treef986e9c4996daa3169705805e0a8ef60e55d240c /taskapp/views
parentfde938bb05d0444568b044487d6865b2dfc7608c (diff)
downloadpytask-f98d30aa38f712f672947c6920920625e4c391eb.tar.gz
pytask-f98d30aa38f712f672947c6920920625e4c391eb.tar.bz2
pytask-f98d30aa38f712f672947c6920920625e4c391eb.zip
updated view task in views to suit the new design .
Diffstat (limited to 'taskapp/views')
-rw-r--r--taskapp/views/task.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/taskapp/views/task.py b/taskapp/views/task.py
index 5a7c8e3..372e361 100644
--- a/taskapp/views/task.py
+++ b/taskapp/views/task.py
@@ -38,7 +38,7 @@ def view_task(request, tid):
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 @@ def view_task(request, tid):
'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"]