diff options
author | hardythe1 | 2014-02-19 16:12:08 +0530 |
---|---|---|
committer | hardythe1 | 2014-02-19 16:12:08 +0530 |
commit | cf9e94b37906ef1a600fb1a843b00349cede14f6 (patch) | |
tree | c720273207884687f17f04957d1ab4dc879b07d0 | |
parent | 8440d0ec6734d384aba024fb6f01f307137f5895 (diff) | |
download | Python-TBC-Interface-cf9e94b37906ef1a600fb1a843b00349cede14f6.tar.gz Python-TBC-Interface-cf9e94b37906ef1a600fb1a843b00349cede14f6.tar.bz2 Python-TBC-Interface-cf9e94b37906ef1a600fb1a843b00349cede14f6.zip |
correcting the query to fetch the six latest 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 bc35c18..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)[0:6] + 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 |