summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhardythe12014-03-15 22:52:02 +0530
committerhardythe12014-03-15 22:52:02 +0530
commit21537f708f61dcab72afa7b825c127d26188785d (patch)
treec434f75fef88fd3c28d3a615dad0750d7a048b40
parent940f5cfc64bd127b93df432b8760897d9786f0f4 (diff)
downloadPython-TBC-Interface-21537f708f61dcab72afa7b825c127d26188785d.tar.gz
Python-TBC-Interface-21537f708f61dcab72afa7b825c127d26188785d.tar.bz2
Python-TBC-Interface-21537f708f61dcab72afa7b825c127d26188785d.zip
change to fetch books which are approved & of required category
-rw-r--r--tbc/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tbc/views.py b/tbc/views.py
index 8fde0a8..f41abf9 100644
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -495,7 +495,7 @@ def BrowseBooks(request):
if category == "all":
books = Book.objects.filter(approved=True)
else:
- books = Book.objects.filter(category=category)
+ books = Book.objects.filter(category=category, approved=True)
else:
books = Book.objects.filter(approved=True)
for book in books: