diff options
author | Nishanth Amuluru | 2011-01-05 18:48:14 +0530 |
---|---|---|
committer | Nishanth Amuluru | 2011-01-05 18:48:14 +0530 |
commit | 608c47baa6889891a7426f66b8e5e3f42fca1d1f (patch) | |
tree | 4201f9af82cd3b1ecdaa4b3bb6a9dbb610b26650 /taskapp/views | |
parent | 478de3e333376a19eb82065742940797b21b5298 (diff) | |
download | pytask-608c47baa6889891a7426f66b8e5e3f42fca1d1f.tar.gz pytask-608c47baa6889891a7426f66b8e5e3f42fca1d1f.tar.bz2 pytask-608c47baa6889891a7426f66b8e5e3f42fca1d1f.zip |
Added a page for displaying all the textbooks
Diffstat (limited to 'taskapp/views')
-rw-r--r-- | taskapp/views/task.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/taskapp/views/task.py b/taskapp/views/task.py index 8a0c1cc..248bf4b 100644 --- a/taskapp/views/task.py +++ b/taskapp/views/task.py @@ -24,6 +24,19 @@ def browse_tasks(request): } return render_to_response('task/browse.html', context) +def show_textbooks(request): + """ display all the tasks """ + + 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") + + context = {'user':user, + 'task_list':task_list, + } + return render_to_response('task/browse.html', context) + def publish_task(request, tid): """ check if user is the mentor and also if the task status is UP. """ |