taskapp/views/task.py
changeset 155 52958289d81f
parent 154 420f974328cc
child 156 7cad1e92713d
--- a/taskapp/views/task.py	Sun Feb 28 22:58:58 2010 +0530
+++ b/taskapp/views/task.py	Mon Mar 01 02:09:00 2010 +0530
@@ -63,13 +63,11 @@
 
     if task.status == "DL":
         return show_msg(user, 'This task no longer exists', '/task/browse/','browse the tasks')
-    comments = task.comment_set.filter(is_deleted=False)
+    comments = task.comment_set.filter(is_deleted=False).order_by('creation_datetime')
     mentors = task.mentors.all()
 
     deps, subs = task.deps, task.subs
     
-    errors = []
-    
     is_guest = True if not user.is_authenticated() else False
     is_mentor = True if user in task.mentors.all() else False
     context = {'user':user,
@@ -80,11 +78,10 @@
                'deps':deps,
                'is_guest':is_guest,
                'is_mentor':is_mentor,
-               'errors':errors,
               }
 
     context['can_publish'] = True if task.status == "UP" and user == task.created_by else False
-    context['task_viewable'] = True if ( task.status != "DL" ) or is_mentor else False
+    context['task_viewable'] = True if ( task.status != "UP" ) or is_mentor else False
     context['task_claimable'] = True if task.status in ["OP", "WR"] else False
 
     context['can_mod_mentors'] = True if task.status in ["UP", "OP", "LO", "WR"] and is_mentor else False