From 7de8dd756e497fcce01356773b211dd62ee4df29 Mon Sep 17 00:00:00 2001
From: hardythe1
Date: Wed, 19 Feb 2014 19:31:03 +0530
Subject: change to fetch the latest 6 books

---
 tbc/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
cgit