diff options
author | hardythe1 | 2014-02-19 19:31:03 +0530 |
---|---|---|
committer | hardythe1 | 2014-02-19 19:31:03 +0530 |
commit | 7de8dd756e497fcce01356773b211dd62ee4df29 (patch) | |
tree | 9e4bf5c5361ee56f0712914c5a9bc862e06cbc95 | |
parent | 7043fbe35f07188a1e326d9e552c04942652d6be (diff) | |
download | Python-TBC-Interface-7de8dd756e497fcce01356773b211dd62ee4df29.tar.gz Python-TBC-Interface-7de8dd756e497fcce01356773b211dd62ee4df29.tar.bz2 Python-TBC-Interface-7de8dd756e497fcce01356773b211dd62ee4df29.zip |
change to fetch the latest 6 books
-rw-r--r-- | tbc/views.py | 2 |
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 |