Har plassert bokhyllene på framsida (#14). Trodde de var der allerede, men tydeligvis ikke.

This commit is contained in:
2011-03-07 12:39:05 +00:00
parent 3969954144
commit 25215718ee
2 changed files with 12 additions and 5 deletions

View File

@@ -82,7 +82,14 @@ def CategoryView(request,category_identifier):
return render_to_response('category/view.html', {'category': category, 'book_list': book_list})
def IndexView(request):
return render_to_response('index.html', {'categories': Category.objects.all().order_by('name')})
shelves = Placement.get_all_shelves()
highlight_string = None
if 'vis' in request.GET:
highlight_string = request.GET['vis']
shelf_lists = [{'shelf_name': shelf,
'shelf_list': Placement.shelf_as_list_row_then_col(shelf)}
for shelf in shelves]
return render_to_response('index.html', {'shelf_lists': shelf_lists, 'highlight_string': highlight_string})
def SearchView(request):
if 'searchterm' in request.GET: