diff options
author | CruiseDevice | 2018-11-01 20:54:35 +0530 |
---|---|---|
committer | CruiseDevice | 2018-11-02 12:43:56 +0530 |
commit | 3a1daffe5fdc2eb97be797b2ceea16f191ffbfb8 (patch) | |
tree | 25b573110d9ecd1bc740c817c4705ed9d145f3ad /sbhs/views.py | |
parent | a7553c125964748830712b6aee58189475547ee0 (diff) | |
download | sbhs_server-3a1daffe5fdc2eb97be797b2ceea16f191ffbfb8.tar.gz sbhs_server-3a1daffe5fdc2eb97be797b2ceea16f191ffbfb8.tar.bz2 sbhs_server-3a1daffe5fdc2eb97be797b2ceea16f191ffbfb8.zip |
Modify show all webcam video feature
Diffstat (limited to 'sbhs/views.py')
-rw-r--r-- | sbhs/views.py | 14 |
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): """ |