From f0b6e7e8f6a1a4b04b6276c71a7461bafedc7ccc Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Tue, 30 Sep 2014 15:38:17 +0530 Subject: sorting the chapter names based on id --- tbc/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tbc/views.py b/tbc/views.py index 47637ad..0705879 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).order_by('name') + chapters = Chapters.objects.filter(book=book).order_by('id') 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).order_by('name') + chapters = Chapters.objects.filter(book=book).order_by('id') images = ScreenShots.objects.filter(book=book) context['chapters'] = chapters context['images'] = images -- cgit