From 9cad9cc2d00e8efa73cf0e501ba7973a3d807fe5 Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Tue, 30 Sep 2014 15:42:35 +0530 Subject: sorting the chapter names based on id --- tbc/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tbc') diff --git a/tbc/views.py b/tbc/views.py index 0705879..5167978 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('id') + chapters = Chapters.objects.filter(book=book).order_by('name','pk') images = ScreenShots.objects.filter(book=book) context['chapters'] = chapters context['images'] = images -- cgit