diff -r 3e8fc2ba0bde -r a606a40584f7 pytask/taskapp/views/textbook.py --- a/pytask/taskapp/views/textbook.py Tue Feb 01 19:37:27 2011 +0530 +++ b/pytask/taskapp/views/textbook.py Tue Feb 01 19:38:41 2011 +0530 @@ -308,7 +308,12 @@ if chapter.parent.id != int(book_id): raise exceptions.PyTaskException(NOT_A_PARENT_FOR_CHAPTER) - return task_view.edit_task(request, chapter_id) + kwargs = { + 'task_url': reverse( + 'view_chapter', kwargs={'book_id': book_id, 'chapter_id': chapter_id}) + } + + return task_view.edit_task(request, chapter_id, **kwargs) def view_chapter(request, book_id, chapter_id, @@ -329,7 +334,11 @@ 'edit_url': reverse('edit_chapter', kwargs={ 'book_id': book_id, 'chapter_id': chapter_id}) } - kwargs = {'context': context} + kwargs = { + 'context': context, + 'task_url': reverse( + 'view_chapter', kwargs={'book_id': book_id, 'chapter_id': chapter_id}) + } return task_view.view_task(request, chapter_id, **kwargs)