summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhardythe12014-09-30 15:38:17 +0530
committerhardythe12014-09-30 15:38:17 +0530
commitf0b6e7e8f6a1a4b04b6276c71a7461bafedc7ccc (patch)
treebe4ef6bbc2380ad810a28a3cf16b72bd8ba94ca1
parent5208bc0d9ac769670e59ce43b933a8c0ce2827b6 (diff)
downloadPython-TBC-Interface-f0b6e7e8f6a1a4b04b6276c71a7461bafedc7ccc.tar.gz
Python-TBC-Interface-f0b6e7e8f6a1a4b04b6276c71a7461bafedc7ccc.tar.bz2
Python-TBC-Interface-f0b6e7e8f6a1a4b04b6276c71a7461bafedc7ccc.zip
sorting the chapter names based on id
-rwxr-xr-xtbc/views.py4
1 files 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