summaryrefslogtreecommitdiff
path: root/tbc
diff options
context:
space:
mode:
authorhardythe12014-09-23 15:49:55 +0530
committerhardythe12014-09-23 15:49:55 +0530
commit704b75f488828a605c11c7c1e93f4b0290338072 (patch)
tree3beca5276138ac4e995856246c969752c7cd5ac0 /tbc
parent0d88b6b4fbb0eaee72a86e34980a29fe286db9d2 (diff)
downloadPython-TBC-Interface-704b75f488828a605c11c7c1e93f4b0290338072.tar.gz
Python-TBC-Interface-704b75f488828a605c11c7c1e93f4b0290338072.tar.bz2
Python-TBC-Interface-704b75f488828a605c11c7c1e93f4b0290338072.zip
sorting the chapter names so they appear in an order
Diffstat (limited to 'tbc')
-rwxr-xr-xtbc/views.py4
1 files changed, 2 insertions, 2 deletions
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