summaryrefslogtreecommitdiff
path: root/tbc/views.py
diff options
context:
space:
mode:
authorhardythe12014-02-19 19:31:03 +0530
committerhardythe12014-02-19 19:31:03 +0530
commit7de8dd756e497fcce01356773b211dd62ee4df29 (patch)
tree9e4bf5c5361ee56f0712914c5a9bc862e06cbc95 /tbc/views.py
parent7043fbe35f07188a1e326d9e552c04942652d6be (diff)
downloadPython-TBC-Interface-7de8dd756e497fcce01356773b211dd62ee4df29.tar.gz
Python-TBC-Interface-7de8dd756e497fcce01356773b211dd62ee4df29.tar.bz2
Python-TBC-Interface-7de8dd756e497fcce01356773b211dd62ee4df29.zip
change to fetch the latest 6 books
Diffstat (limited to 'tbc/views.py')
-rw-r--r--tbc/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tbc/views.py b/tbc/views.py
index e3b31f3..bf36eb4 100644
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -80,7 +80,7 @@ def Home(request):
context['update_book'] = True
if 'not_found' in request.GET:
context['not_found'] = True
- books = Book.objects.filter(approved=True)
+ books = Book.objects.filter(approved=True).order_by("-id")[0:6]
for book in books:
images.append(ScreenShots.objects.filter(book=book)[0])
context['images'] = images