summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tbc/templates/tbc/browse-books.html1
-rw-r--r--tbc/views.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/tbc/templates/tbc/browse-books.html b/tbc/templates/tbc/browse-books.html
index 5996d93..e278eaa 100644
--- a/tbc/templates/tbc/browse-books.html
+++ b/tbc/templates/tbc/browse-books.html
@@ -16,6 +16,7 @@ function submitCategory()
<form name="browseBooks" action="/browse-books/" method=POST enctype="multipart/form-data">
{% csrf_token %}
<center><select name="category" id="category" onchange="submitCategory();">
+ <option value="all">All</option>
<option value="fluid mechanics">Fluid Mechanics</option>
<option value="control systems">Control Theory & Control Systems</option>
<option value="chemical engineering">Chemical Engineering</option>
diff --git a/tbc/views.py b/tbc/views.py
index e7c3171..762f0bd 100644
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -473,6 +473,7 @@ def NotifyChanges(request, book_id=None):
def BrowseBooks(request):
context = {}
+ category = None
if request.user.is_anonymous():
context['anonymous'] = True
else:
@@ -487,8 +488,7 @@ def BrowseBooks(request):
for book in books:
images.append(ScreenShots.objects.filter(book=book)[0])
else:
- category = 'computer science'
- books = Book.objects.filter(category='computer science')
+ books = Book.objects.all()
for book in books:
images.append(ScreenShots.objects.filter(book=book)[0])
context.update(csrf(request))