Now browse tasks page does not display textbooks
authorNishanth Amuluru <nishanth@fossee.in>
Wed, 05 Jan 2011 18:52:48 +0530
changeset 217 307f699e6102
parent 216 ab7c24ab8d93
child 218 59107ce0a618
Now browse tasks page does not display textbooks
taskapp/views/task.py
--- a/taskapp/views/task.py	Wed Jan 05 18:50:20 2011 +0530
+++ b/taskapp/views/task.py	Wed Jan 05 18:52:48 2011 +0530
@@ -18,6 +18,8 @@
     
     user = get_user(request.user) if request.user.is_authenticated() else request.user
     task_list = Task.objects.exclude(status="UP").exclude(status="DL").order_by('published_datetime').reverse()
+
+    task_list = task_list.exclude(tags_field__icontains="textbook")
     
     context = {'user':user,
                'task_list':task_list,
@@ -30,7 +32,7 @@
     user = get_user(request.user) if request.user.is_authenticated() else request.user
     task_list = Task.objects.exclude(status="UP").exclude(status="DL").order_by('published_datetime').reverse()
 
-    textbooks = task_list.filter(tags_field__icontains="textbook")
+    task_list = task_list.filter(tags_field__icontains="textbook")
     
     context = {'user':user,
                'task_list':task_list,