Ryddet litt i koden til MapIndex.
This commit is contained in:
python/web
@ -59,8 +59,16 @@ def PersonIndex(request):
|
||||
|
||||
def MapIndex(request):
|
||||
shelves = Placement.get_all_shelves()
|
||||
shelf_lists = [(shelf, Placement.shelf_as_list_row_then_col(shelf)) for shelf in shelves]
|
||||
return render_to_response('map/index.html', {'shelf_lists': shelf_lists})
|
||||
highlight_list = []
|
||||
if 'highlight' in request.GET:
|
||||
highlight_string = request.GET['highlight']
|
||||
for category in Category.objects.filter(id=highlight_string):
|
||||
highlight_list.append(category)
|
||||
shelf_lists = [{'shelf_name': shelf,
|
||||
'shelf_list': Placement.shelf_as_list_row_then_col(shelf)}
|
||||
for shelf in shelves]
|
||||
print highlight_list
|
||||
return render_to_response('map/index.html', {'shelf_lists': shelf_lists, 'highlight': highlight_list})
|
||||
|
||||
def MapView(request,shelf_identifier):
|
||||
if shelf_identifier not in Placement.get_all_shelves():
|
||||
|
Reference in New Issue
Block a user