summaryrefslogtreecommitdiff
path: root/sbhs/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'sbhs/views.py')
-rw-r--r--sbhs/views.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/sbhs/views.py b/sbhs/views.py
index f0da87d..530e692 100644
--- a/sbhs/views.py
+++ b/sbhs/views.py
@@ -740,13 +740,19 @@ def all_bookings(request):
def all_images(request):
user = request.user
context = {}
+ image_links = []
if not is_moderator(user):
raise Http404("You are not allowed to see this page.")
else:
boards = Board.objects.filter(online=True)
for board in boards:
- Webcam.load_image(board.mid)
- context["boards"] = boards
+ board_image_link = {}
+ capture_status = Webcam.load_image(board.mid)
+ board_image_link["board"] = board
+ if capture_status != 0:
+ board_image_link["image_link"] = board.image_link()
+ image_links.append(board_image_link.copy())
+ context["image_links"] = image_links
return render(request,'dashboard/all_images.html')
@@ -892,10 +898,6 @@ def download_file(request, experiment_id):
################## Webcam Views #############################
-def reload(request, mid):
- Webcam.load_image(mid)
- return HttpResponse("")
-
@login_required
def show_video(request):
"""