From 704b75f488828a605c11c7c1e93f4b0290338072 Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Tue, 23 Sep 2014 15:49:55 +0530 Subject: sorting the chapter names so they appear in an order --- tbc/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tbc') diff --git a/tbc/views.py b/tbc/views.py index bc3913b..47637ad 100755 --- a/tbc/views.py +++ b/tbc/views.py @@ -451,7 +451,7 @@ def BookDetails(request, book_id=None): else: context['user'] = request.user book = Book.objects.get(id=book_id) - chapters = Chapters.objects.filter(book=book) + chapters = Chapters.objects.filter(book=book).order_by('name') images = ScreenShots.objects.filter(book=book) context['chapters'] = chapters context['images'] = images @@ -464,7 +464,7 @@ def BookReview(request, book_id=None): if is_reviewer(request.user): if book_id: book = Book.objects.get(id=book_id) - chapters = Chapters.objects.filter(book=book) + chapters = Chapters.objects.filter(book=book).order_by('name') images = ScreenShots.objects.filter(book=book) context['chapters'] = chapters context['images'] = images -- cgit